Implement "skippable" option for scripted services.
[oweals/dinit.git] / doc / linux / services / late-filesystems.sh
index 3962e4edb9f87cf61db3089bc1d5b2f512186564..454d12f1060c4e73e38cbfcc62e39e2befef42c1 100755 (executable)
@@ -5,8 +5,12 @@ if [ "$1" = start ]; then
     PATH=/usr/bin:/usr/sbin:/bin:/sbin
 
     fsck -a /dev/sdb2
-    mount /dev/sdb2 /mnt/sdb2
-    mount --bind /mnt/sdb2/src /usr/src
-    mount --bind /mnt/sdb2 /mnt/tmp  # hopefully can remove this at some point
+    fsckresult=$?
+    if [ $fsckresult -eq 0 ]; then
+       mount /dev/sdb2 /mnt/sdb2
+       exit $?
+    else
+        exit $fsckresult
+    fi
 
 fi