Skip to content

Commit

Permalink
Making read-only function self contained.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Jul 25, 2012
1 parent d0fe631 commit dffc7e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 0 additions & 4 deletions scripts/boot/0110-cmdline
Expand Up @@ -7,10 +7,6 @@ Cmdline ()
for _PARAMETER in ${_CMDLINE}
do
case "${_PARAMETER}" in
live-boot.read-only|read-only)
LIVE_READ_ONLY="true"
;;

live-boot.verify-checksums|verify-checksums)
LIVE_VERIFY_CHECKSUMS="true"
;;
Expand Down
14 changes: 14 additions & 0 deletions scripts/boot/0120-read-only
Expand Up @@ -4,6 +4,20 @@

Read_only ()
{
for _PARAMETER in ${_CMDLINE}
do
case "${_PARAMETER}" in
live-boot.read-only|read-only)
LIVE_READ_ONLY="true"
;;
esac
done

if [ "${LIVE_READ_ONLY}" != "true" ]
then
return 0
fi

# 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*"
Expand Down
6 changes: 1 addition & 5 deletions scripts/boot/9990-main.sh
Expand Up @@ -28,11 +28,7 @@ Main ()
;;
esac

case "${LIVE_READ_ONLY}" in
true)
Read_only
;;
esac
Read_only

Select_eth_device

Expand Down

0 comments on commit dffc7e9

Please sign in to comment.