filesystems: set 'noatime' option for also previously configured root filesystem

This commit is contained in:
Silvan Calarco 2012-07-30 16:29:36 +02:00
parent 42f193f4eb
commit efd02e0b17
2 changed files with 7 additions and 1 deletions

View File

@ -1 +1 @@
VERSION = 1.2.18.1
VERSION = 1.2.19

View File

@ -310,5 +310,11 @@ ${fstype:-"auto"} ${options:-"noauto,user"}${extra_options} ${check_options}" >>
fi
done
grep "[[:space:]]/[[:space:]].*ext[2-9].*defaults[[:space:]]" /etc/fstab >/dev/null && {
logmsg "$me" $"enabling \`noatime' option for root filesystem"
sed -i "s|\([[:space:]]/[[:space:]].*ext[2-9].*defaults\)\([[:space:]]\)|\1,noatime\2|" /etc/fstab
mount -o remount /
}
[ "$swapon" = 1 ] && swapon -a
exit 0