If a user sets the commit parameter in /etc/fstab, the value would have been ignored and reset to the default kernel value of 5 s. By not passing the commit parameter explicitly, the value will be taken from the /etc/fstab file, or if not present in that file, will be reset to the default kernel value of 5 s.
Signed off by Nic Case <[email protected]> --- diff --git a/pm/power.d/journal-commit b/pm/power.d/journal-commit index 5c0fc16..325e6d5 100644 --- a/pm/power.d/journal-commit +++ b/pm/power.d/journal-commit @@ -24,7 +24,7 @@ remount_fs() { # $1 = filesystem to remount # $2 = mount option to change - mount -o remount,$2 $1 + mount -o remount$2 $1 } # invoked on an ext3 file system @@ -32,7 +32,11 @@ handle_ext3() { # $1 = filesystem to remount # $2 = commit time - remount_fs $1 "commit=${2}" + if [ "$2" = "0" ]; then + remount_fs $1 + else + remount_fs $1 ",commit=${2}" + fi } handle_ext4() { handle_ext3 "$@"; } _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
