X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fboot%2F0120-read-only;h=859f77105c7398475112928be0cbc896bf8a8011;hb=5fdc7f1fd20cee26443879022c1e6a3d0377a2b3;hp=948c2d569a0a8ac06668be23fff1eed93ed12d02;hpb=dffc7e9ae4ff75c3110db7c24556fa6796ae5437;p=live-boot-grml.git diff --git a/scripts/boot/0120-read-only b/scripts/boot/0120-read-only index 948c2d5..859f771 100755 --- a/scripts/boot/0120-read-only +++ b/scripts/boot/0120-read-only @@ -7,22 +7,31 @@ Read_only () for _PARAMETER in ${_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 - if [ "${LIVE_READ_ONLY}" != "true" ] - then - return 0 - fi + 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. - _DEVICES="/dev/sd* /dev/vd*" + LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}" - for _DEVICE in ${_DEVICES} + for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g') do if [ ! -b "${_DEVICE}" ] then