aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-01-08 01:53:34 -0500
committerDave Reisner <d@falconindy.com>2010-01-08 01:53:34 -0500
commit903241c2bf5365327abed950bcf5f774b4795f00 (patch)
tree3c8573fd70c2c948e6fa8b09437f3968db6bd5bc
parent7a830d0ad4e8cc7b4d59b7e56d67aacba5f55879 (diff)
downloadsquashfu-903241c2bf5365327abed950bcf5f774b4795f00.tar.gz
Add proto for usage function
-rwxr-xr-xsquashfu10
1 files changed, 6 insertions, 4 deletions
diff --git a/squashfu b/squashfu
index 5433fdd..1845dcb 100755
--- a/squashfu
+++ b/squashfu
@@ -103,6 +103,11 @@ finish_routine () {
unmount_all
}
+usage () {
+ info "This is what happens when you can't read"
+ exit
+}
+
# Sanity checks
# - Are we root?
[[ $UID -eq 0 ]] || die Must be root!
@@ -111,7 +116,7 @@ finish_routine () {
[[ -w "${BKUP_ROOT}" ]] ||
die "Backup root is not accessible. Please check your setting in /etc/squashfu"
-# Blindly unmount all just in case
+# Check for pre-existing mounts just in case (and unmount them)
unmount_all
# - do we have a proper (expected) directory structure in place?
@@ -125,9 +130,6 @@ cd "$BKUP_ROOT" && mkdir -p {rw,ro,bins/{1,2,3,4,5,6,7}}
create_new_seed;
}
-# mount seed if it exists and is not already mounted
-grep "${BKUP_ROOT}/ro" /proc/mounts || mount_seed
-
# Prepare union mount with proper bins
mount_union_ro $(( $(date +%u) + $MODIFIER ))
mount_union_branch_rw $(( $(date +%u) + $MODIFIER ))