Skip to content

Commit

Permalink
forensic-mark-readonly: check only for boot option read-only
Browse files Browse the repository at this point in the history
The "forensic" boot option isn't in use anymore and live-boot
upstream has renamed "readonly" to "read-only", so adapt code
accordingly.
  • Loading branch information
mika committed Apr 2, 2014
1 parent 665c8a3 commit a6b78e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/forensic-mark-readonly
@@ -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.
Expand All @@ -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)
Expand Down

0 comments on commit a6b78e9

Please sign in to comment.