summaryrefslogtreecommitdiff
path: root/examples/hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-26 14:03:26 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:31 +0100
commitc77053d3d81ac6bf03a16bc73f4c583b55e48a3e (patch)
tree5754bf90011ef896ba0c6c9b612f8faf671ea1cc /examples/hooks
parentc5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a (diff)
downloadvyos-live-build-c77053d3d81ac6bf03a16bc73f4c583b55e48a3e.tar.gz
vyos-live-build-c77053d3d81ac6bf03a16bc73f4c583b55e48a3e.zip
Replacing lb_chroot_symlinks with a hook, that's more approriate.
Diffstat (limited to 'examples/hooks')
-rwxr-xr-xexamples/hooks/all_chroot_symlinks.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/hooks/all_chroot_symlinks.sh b/examples/hooks/all_chroot_symlinks.sh
new file mode 100755
index 000000000..b0f2eea47
--- /dev/null
+++ b/examples/hooks/all_chroot_symlinks.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This is a hook for live-build(7) to install localepurge.
+# To enable it, copy or symlink this hook into your config/chroot_local-hooks
+# directory.
+#
+
+_PURGE=""
+
+if [ ! -x "$(which symlinks 2>/dev/null)" ]
+then
+ _PURGE="true"
+
+ apt-get install symlinks
+fi
+
+symlinks -c -r -s /
+
+if [ "${_PURGE}" = "true" ]
+then
+ apt-get remove --purge symlinks
+fi