Skip to content

Commit

Permalink
Update zram-config
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartIanNaylor authored May 6, 2019
1 parent 6b8fb1a commit a6ef3da
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions zram-config
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ createZlog () {
journalctl --flush >>${ZLOG} 2>&1 || return 1
if [ ! -z "$OLDLOG_DIR" ]
then
cp -arvf /etc/logrotate.conf ${ZSHARE}/logrotate.conf.bak >>${ZLOG} 2>&1 || return 1
sed -i "/^weekly.*/i olddir ${ZDIR}${OLDLOG_DIR}" /etc/logrotate.conf >>${ZLOG} 2>&1 || return 1
sed -i "/^weekly.*/i createolddir 755 root root" /etc/logrotate.conf >>${ZLOG} 2>&1 || return 1
sed -i "/^weekly.*/i renamecopy" /etc/logrotate.conf >>${ZLOG} 2>&1 || return 1
echo "olddir "${ZDIR}${OLDLOG_DIR} > /etc/logrotate.d/00_oldlog
echo "createolddir 755 root root" >> /etc/logrotate.d/00_oldlog
echo "renamecopy" >> /etc/logrotate.d/00_oldlog
else
echo "createZlog no oldlog dir in ztab" >>${ZLOG}
fi
Expand Down Expand Up @@ -112,7 +111,7 @@ mergeOverlay () {
removeZlog () {
if [ ! -z "$OLDLOG_DIR" ]
then
cp -arvf ${ZSHARE}/logrotate.conf.bak /etc/logrotate.conf >>${ZLOG} 2>&1 || return 1
rm /etc/logrotate.d/00_oldlog
fi
echo "$ZRAM_DEV" >>${ZLOG}
#syncToDisk
Expand Down

0 comments on commit a6ef3da

Please sign in to comment.