filesystems: set 'noatime' option for also previously configured root filesystem
This commit is contained in:
parent
42f193f4eb
commit
efd02e0b17
@ -310,5 +310,11 @@ ${fstype:-"auto"} ${options:-"noauto,user"}${extra_options} ${check_options}" >>
|
|||||||
fi
|
fi
|
||||||
done
|
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
|
[ "$swapon" = 1 ] && swapon -a
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user