summaryrefslogtreecommitdiff
path: root/src/scripts/12patch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/12patch.sh')
-rw-r--r--src/scripts/12patch.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/scripts/12patch.sh b/src/scripts/12patch.sh
index 16be344f1..873865c36 100644
--- a/src/scripts/12patch.sh
+++ b/src/scripts/12patch.sh
@@ -27,6 +27,30 @@ Patch_chroot ()
esac
}
+Patch_runlevel ()
+{
+ # Disabling all init scripts with a blocking policy as in
+ # /usr/share/doc/sysv-rc/README.policy-rc.d.gz.
+
+ case "${1}" in
+ apply)
+ # Create init policy
+ echo > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d <<EOF
+#!/bin/sh
+
+exit 101
+EOF
+
+ chmod 0755 "${LIVE_CHROOT}"/usr/sbin/policy-rc.d
+ ;;
+
+ deapply)
+ # Removing init policy
+ rm -f "${LIVE_CHROOT}"/usr/sbin/policy-rc.d
+ ;;
+ esac
+}
+
Patch_network ()
{
# Packages which are manually installed inside the chroot are installed