summaryrefslogtreecommitdiff
path: root/scripts/boot/0020-read-only
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2013-06-24 21:38:08 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-06-24 21:38:08 +0200
commita331218718282c5496ff062a0f6aa55908224862 (patch)
treed42688bb069ed11d54ca122c64884661c2f2bcd8 /scripts/boot/0020-read-only
parent0aa07bd386f516176364e710e8b9132036c72986 (diff)
downloadlive-boot-a331218718282c5496ff062a0f6aa55908224862.tar.gz
live-boot-a331218718282c5496ff062a0f6aa55908224862.zip
Reorganizing components in source tree.
Diffstat (limited to 'scripts/boot/0020-read-only')
-rwxr-xr-xscripts/boot/0020-read-only56
1 files changed, 0 insertions, 56 deletions
diff --git a/scripts/boot/0020-read-only b/scripts/boot/0020-read-only
deleted file mode 100755
index fc0dde0..0000000
--- a/scripts/boot/0020-read-only
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-#set -e
-
-Read_only ()
-{
- for _PARAMETER in ${LIVE_BOOT_CMDLINE}
- do
- case "${_PARAMETER}" in
- live-boot.read-only=*|read-only=*)
- LIVE_READ_ONLY="true"
- LIVE_READ_ONLY_DEVICES="${_PARAMETER#*read-only=}"
- ;;
-
- live-boot.read-only|read-only)
- LIVE_READ_ONLY="true"
- ;;
- esac
- done
-
- case "${LIVE_READ_ONLY}" in
- true)
- ;;
-
- *)
- return 0
- ;;
- esac
-
- # Marking some block devices as read-only to ensure that nothing
- # gets written as linux still writes to 'only' read-only mounted filesystems.
- LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}"
-
- for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g')
- do
- if [ ! -b "${_DEVICE}" ]
- then
- continue
- fi
-
- echo -n "live-boot: Setting ${_DEVICE} read-only..." > /dev/console
-
- blockdev --setro ${_DEVICE}
- _RETURN="${?}"
-
- case "${_RETURN}" in
- 0)
- echo " done, use 'blockdev --setrw ${_DEVICE}' to set read-write." > /dev/console
- ;;
-
- *)
- echo " failed." > /dev/console
- ;;
- esac
- done
-}