summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrleigh@debian.org <rleigh@debian.org>2013-05-08 21:48:24 +0100
committerMichael Prokop <mika@debian.org>2014-09-25 08:37:05 +0200
commitcfdafe62c944f6e9ad930527a24d5d11f44c778e (patch)
treed63366e2c465c351a8e18852e09bbbc49d793e50 /scripts
parent81956cd735086b978b1e07c7d7efcb19c9e4984d (diff)
scripts: Add overridable indirect functions
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions28
-rw-r--r--scripts/local25
-rw-r--r--scripts/nfs25
3 files changed, 76 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index e988b98..3ba5a27 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -513,3 +513,31 @@ mountfs()
${type}_mount_fs "$1"
}
+
+# Mount the root file system. It should be overridden by all
+# boot scripts.
+mountroot()
+{
+ :
+}
+
+# Run /scripts/${boot}-top. This should be overridden by all boot
+# scripts.
+mount_top()
+{
+ :
+}
+
+# Run /scripts/${boot}-premount. This should be overridden by all boot
+# scripts.
+mount_premount()
+{
+ :
+}
+
+# Run /scripts/${boot}-bottom. This should be overridden by all boot
+# scripts.
+mount_bottom()
+{
+ :
+}
diff --git a/scripts/local b/scripts/local
index e1da5c7..0c61ca3 100644
--- a/scripts/local
+++ b/scripts/local
@@ -101,7 +101,7 @@ pre_mountroot()
done
}
-mountroot()
+local_mount_root()
{
local_top
@@ -160,3 +160,26 @@ local_mount_fs()
# Mount filesystem
mount ${roflag} -t "${MNT_TYPE}" -o "${MNT_OPTS}" "$MNT_FSNAME" "${rootmnt}${MNT_DIR}"
}
+
+mountroot()
+{
+ local_mount_root
+}
+
+mount_top()
+{
+ # Note, also called directly in case it's overridden.
+ local_top
+}
+
+mount_premount()
+{
+ # Note, also called directly in case it's overridden.
+ local_premount
+}
+
+mount_bottom()
+{
+ # Note, also called directly in case it's overridden.
+ local_bottom
+}
diff --git a/scripts/nfs b/scripts/nfs
index 879cb5d..5422e6a 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -76,7 +76,7 @@ do_nfsmount()
}
# NFS root mounting
-mountroot()
+nfs_mount_root()
{
nfs_top
@@ -142,3 +142,26 @@ nfs_mount_fs()
# the rootfs or /etc.
nfs_mount_fs_impl "$1"
}
+
+mountroot()
+{
+ nfs_mount_root
+}
+
+mount_top()
+{
+ # Note, also called directly in case it's overridden.
+ nfs_top
+}
+
+mount_premount()
+{
+ # Note, also called directly in case it's overridden.
+ nfs_premount
+}
+
+mount_bottom()
+{
+ # Note, also called directly in case it's overridden.
+ nfs_bottom
+}