diff options
author | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-15 21:40:31 +0100 |
---|---|---|
committer | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-15 21:40:31 +0100 |
commit | 0318eec2f613ed905363c31316fd50ee8bdde85d (patch) | |
tree | cd22e405c38e23787f23a576144ce2825c711ed5 | |
parent | Handle \r\n when building the configuration file (diff) | |
download | gentoaster-0318eec2f613ed905363c31316fd50ee8bdde85d.tar.gz gentoaster-0318eec2f613ed905363c31316fd50ee8bdde85d.tar.bz2 gentoaster-0318eec2f613ed905363c31316fd50ee8bdde85d.zip |
Let's try not to nuke /dev if things go wrong
-rwxr-xr-x | create_image.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/create_image.sh b/create_image.sh index f87e507..77664f1 100755 --- a/create_image.sh +++ b/create_image.sh @@ -64,8 +64,8 @@ cleanup_mounts() { umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev/shm &>> ${LOG_FILE} umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev &>> ${LOG_FILE} umount -d -f ${IMAGE_WORK_PATH}/rootfs/proc &>> ${LOG_FILE} - umount -d -f ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE} - umount -d -f ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE} + umount -d -f -l ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE} + umount -d -f -l ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE} sleep 2 } @@ -73,8 +73,7 @@ cleanup_mounts() { handle_error() { echo "$1" cd ${IMAGE_WORK_PATH} - cleanup_mounts - rm -rf ${IMAGE_WORK_PATH} + cleanup_mounts && rm -rf ${IMAGE_WORK_PATH} exit 1 } |