7 for _PARAMETER in ${_CMDLINE}
9 case "${_PARAMETER}" in
10 live-boot.read-only=*|read-only=*)
12 LIVE_READ_ONLY_DEVICES="${_PARAMETER#*read-only=}"
15 live-boot.read-only|read-only)
21 if [ "${LIVE_READ_ONLY}" != "true" ]
26 # Marking some block devices as read-only to ensure that nothing
27 # gets written as linux still writes to 'only' read-only mounted filesystems.
28 LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}"
30 for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g')
32 if [ ! -b "${_DEVICE}" ]
37 echo -n "live-boot: Setting ${_DEVICE} read-only..." > /dev/console
39 blockdev --setro ${_DEVICE}
44 echo " done, use 'blockdev --setrw ${_DEVICE}' to set read-write." > /dev/console
48 echo " failed." > /dev/console