summarylogtreecommitdiffstats
path: root/tarballroot-hook
diff options
context:
space:
mode:
Diffstat (limited to 'tarballroot-hook')
-rw-r--r--tarballroot-hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/tarballroot-hook b/tarballroot-hook
new file mode 100644
index 000000000000..6ef5243fb3d9
--- /dev/null
+++ b/tarballroot-hook
@@ -0,0 +1,14 @@
+# vim: set ft=sh:
+run_hook() {
+ if [ "${root}" = "tarball" ]; then
+ # set mount handler
+ mount_handler="tarball_mount_handler"
+ fi
+}
+
+tarball_mount_handler() {
+ mount -t tmpfs root "$1"
+ wget -O- ${tarball} | tar -Jx -C "$1"
+}
+
+# vim: set ft=sh ts=4 sw=4 et: