Disable the umount trap if run-parts returns 0
authorNikos Skalkotos <skalkoto@grnet.gr>
Fri, 7 Oct 2011 08:46:21 +0000 (11:46 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Fri, 7 Oct 2011 08:46:21 +0000 (11:46 +0300)
snf-image-helper/snf-image-helper.in

index 89e4078..3afee69 100644 (file)
@@ -74,6 +74,9 @@ trap '{ umount $target; }' ERR
 echo "Execute all snf-image tasks...." 
 $RUN_PARTS -v --exit-on-error "@tasksdir@"
 
+# Disable the trap. If code reaches here, the filesystem is unmounted.
+trap - ERR
+
 echo "SUCCESS" > $RESULT
 
 cleanup