diff --git a/share/scripts/context-packages/base/etc/init.d/vmcontext b/share/scripts/context-packages/base/etc/init.d/vmcontext index 641620edf3..30deb54a7b 100755 --- a/share/scripts/context-packages/base/etc/init.d/vmcontext +++ b/share/scripts/context-packages/base/etc/init.d/vmcontext @@ -50,16 +50,21 @@ function execute_scripts { done } -if [ -e "/dev/disk/by-label/CONTEXT" ]; then - mount -t iso9660 -L CONTEXT -o ro /mnt - if [ -f /mnt/context.sh ]; then - export_rc_vars /mnt/context.sh +case "$1" in +"start") + if [ -e "/dev/disk/by-label/CONTEXT" ]; then + mount -t iso9660 -L CONTEXT -o ro /mnt + if [ -f /mnt/context.sh ]; then + export_rc_vars /mnt/context.sh + fi + + execute_scripts + + umount /mnt + else + execute_scripts fi + ;; - execute_scripts - - umount /mnt -else - execute_scripts -fi +esac