diff options
| author | Daniel Baumann <daniel@debian.org> | 2012-06-14 20:55:18 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2012-06-14 20:55:18 +0200 |
| commit | 1faa69ad4719944a3ea9c7a02da21f7b5d0170d5 (patch) | |
| tree | 5a9f654f77bd0de2e11b2c7500564575d98572b2 /scripts/boot/mountroot.sh | |
| parent | 297a309435665db2053afe08e4af5ea08392ef26 (diff) | |
| download | live-boot-1faa69ad4719944a3ea9c7a02da21f7b5d0170d5.tar.gz live-boot-1faa69ad4719944a3ea9c7a02da21f7b5d0170d5.zip | |
Updating coding style in a first bunch of locations.
Diffstat (limited to 'scripts/boot/mountroot.sh')
| -rwxr-xr-x | scripts/boot/mountroot.sh | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/scripts/boot/mountroot.sh b/scripts/boot/mountroot.sh index dbc66d4..5383747 100755 --- a/scripts/boot/mountroot.sh +++ b/scripts/boot/mountroot.sh @@ -4,8 +4,9 @@ mountroot () { - if [ -x /scripts/local-top/cryptroot ]; then - /scripts/local-top/cryptroot + if [ -x /scripts/local-top/cryptroot ] + then + /scripts/local-top/cryptroot fi exec 6>&1 @@ -136,7 +137,8 @@ mountroot () fi - if [ -n "${ROOT_PID}" ] ; then + if [ -n "${ROOT_PID}" ] + then echo "${ROOT_PID}" > "${rootmnt}"/live/root.pid fi @@ -144,10 +146,11 @@ mountroot () # unionfs-fuse needs /dev to be bind-mounted for the duration of # live-bottom; udev's init script will take care of things after that - if [ "${UNIONTYPE}" = unionfs-fuse ] - then - mount -n -o bind /dev "${rootmnt}/dev" - fi + case "${UNIONTYPE}" in + unionfs-fuse) + mount -n -o bind /dev "${rootmnt}/dev" + ;; + esac # Move to the new root filesystem so that programs there can get at it. if [ ! -d /root/live/image ] @@ -205,10 +208,11 @@ mountroot () ;; esac - if [ "${UNIONFS}" = unionfs-fuse ] - then - umount "${rootmnt}/dev" - fi + case "${UNIONFS}" in + unionfs-fuse) + umount "${rootmnt}/dev" + ;; + esac exec 1>&6 6>&- exec 2>&7 7>&- |
