#!/bin/sh # make-live - utility to build Debian Live systems # # Copyright (C) 2006 Daniel Baumann # Copyright (C) 2006 Marco Amadori # # make-live comes with ABSOLUTELY NO WARRANTY; for details see COPYING. # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. Patch_chroot () { # Some maintainer scripts can detect if they are in a chrooted system. # Therefore, we create the needed file. case "${1}" in apply) # Create chroot file echo "debian-live" > "${LIVE_CHROOT}"/etc/debian_chroot ;; deapply) # Remove chroot file rm -f "${LIVE_CHROOT}"/etc/debian_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 <> "${LIVE_CHROOT}"/etc/kernel-img.conf ;; deapply) # Remove configuration file rm -f "${LIVE_CHROOT}"/etc/kernel-img.conf ;; esac }