forensic-mark-readonly: check only for boot option read-only
authorMichael Prokop <mika@grml.org>
Wed, 2 Apr 2014 09:40:15 +0000 (11:40 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 2 Apr 2014 09:40:16 +0000 (11:40 +0200)
The "forensic" boot option isn't in use anymore and live-boot
upstream has renamed "readonly" to "read-only", so adapt code
accordingly.

scripts/forensic-mark-readonly

index f277df5..cd7afc8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Filename:      forensic-mark-readonly
-# Purpose:       force device to readonly mode when booting with bootoption forensic/readonly
+# Purpose:       force block devices to read-only mode when booting with boot option read-only
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
@@ -24,8 +24,8 @@ is_ro() {
     [ "$(blockdev --getro $1)" = "1" ] && return 0 || return 1
 }
 
-# check for forensic/readonly bootoption
-if grep -qe forensic -qe readonly /proc/cmdline ; then
+# check for read-only bootoption
+if grep -q read-only /proc/cmdline ; then
  # we get $DEVNAME via udev's environment
  if [ -n "$DEVNAME" ] ; then
     NAME=$(base $DEVNAME)