From a6ef3da9c6c8a89db64014ed9e27621e8b7498f4 Mon Sep 17 00:00:00 2001 From: StuartIanNaylor Date: Mon, 6 May 2019 22:02:45 +0100 Subject: [PATCH] Update zram-config --- zram-config | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zram-config b/zram-config index 6b8fafe..6a8c73b 100755 --- a/zram-config +++ b/zram-config @@ -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 @@ -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