Merge pull request #213301 from bcc32/atop-dont-leave-new-log-files
nixos/atop: Remove upgraded logfiles if not replaced
This commit is contained in:
commit
f7eeb48523
|
@ -151,6 +151,8 @@ in
|
||||||
if ! ${pkgs.diffutils}/bin/cmp -s "$logfile" "$logfile".new
|
if ! ${pkgs.diffutils}/bin/cmp -s "$logfile" "$logfile".new
|
||||||
then
|
then
|
||||||
${pkgs.coreutils}/bin/mv -v -f "$logfile".new "$logfile"
|
${pkgs.coreutils}/bin/mv -v -f "$logfile".new "$logfile"
|
||||||
|
else
|
||||||
|
${pkgs.coreutils}/bin/rm -f "$logfile".new
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue