r2750 - in dists/trunk/live-helper: docs helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Sun Aug 12 20:26:23 UTC 2007


Author: daniel
Date: 2007-08-12 20:26:23 +0000 (Sun, 12 Aug 2007)
New Revision: 2750

Added:
   dists/trunk/live-helper/helpers/lh_chroot_dpkg
Modified:
   dists/trunk/live-helper/docs/ChangeLog
   dists/trunk/live-helper/helpers/lh_chroot
Log:


Modified: dists/trunk/live-helper/docs/ChangeLog
===================================================================
--- dists/trunk/live-helper/docs/ChangeLog	2007-08-12 07:51:32 UTC (rev 2749)
+++ dists/trunk/live-helper/docs/ChangeLog	2007-08-12 20:26:23 UTC (rev 2750)
@@ -1,5 +1,10 @@
 2007-08-12  Daniel Baumann  <daniel at debian.org>
 
+	* helpers/lh_chroot_dpkg:
+	  - Added.
+
+2007-08-12  Daniel Baumann  <daniel at debian.org>
+
 	* Uploaded 1.0~a22-1.
 
 2007-08-08  Daniel Baumann  <daniel at debian.org>

Modified: dists/trunk/live-helper/helpers/lh_chroot
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot	2007-08-12 07:51:32 UTC (rev 2749)
+++ dists/trunk/live-helper/helpers/lh_chroot	2007-08-12 20:26:23 UTC (rev 2750)
@@ -37,6 +37,7 @@
 lh_chroot_proc install ${*}
 lh_chroot_sysfs install ${*}
 lh_chroot_debianchroot install ${*}
+lh_chroot_dpkg install ${*}
 lh_chroot_sysv-rc install ${*}
 lh_chroot_hosts install ${*}
 lh_chroot_resolv install ${*}
@@ -70,6 +71,7 @@
 lh_chroot_resolv remove ${*}
 lh_chroot_hosts remove ${*}
 lh_chroot_sysv-rc remove ${*}
+lh_chroot_dpkg remove ${*}
 lh_chroot_debianchroot remove ${*}
 lh_chroot_sysfs remove ${*}
 lh_chroot_proc remove ${*}

Added: dists/trunk/live-helper/helpers/lh_chroot_dpkg
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot_dpkg	                        (rev 0)
+++ dists/trunk/live-helper/helpers/lh_chroot_dpkg	2007-08-12 20:26:23 UTC (rev 2750)
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+# lh_chroot_dpkg(1) - manage /sbin/dpkg
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper 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.
+
+set -e
+
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for FUNCTION in "${LH_BASE}"/functions/*.sh
+do
+	. "${FUNCTION}"
+done
+
+# Setting static variables
+DESCRIPTION="manage /sbin/dpkg"
+HELP=""
+USAGE="${PROGRAM} {install|remove} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+case "${1}" in
+	install)
+		Echo_message "Configuring file /sbin/start-stop-daemon"
+
+		# Checking stage file
+		Check_stagefile .stage/chroot_dpkg
+
+		# Checking lock file
+		Check_lockfile .lock
+
+		# Creating lock file
+		Create_lockfile .lock
+
+		# Save start-stop-daemon program
+		mv chroot/sbin/start-stop-daemon chroot/sbin/start-stop-daemon.orig
+
+		# Create start-stop-daemon program
+
+cat > chroot/sbin/start-stop-daemon << EOF
+#!/bin/sh
+
+exit 0
+EOF
+
+		chmod 755 chroot/sbin/start-stop-daemon
+
+		# Creating stage file
+		Create_stagefile .stage/chroot_dpkg
+		;;
+
+	remove)
+		# Checking lock file
+		Check_lockfile .lock
+
+		# Creating lock file
+		Create_lockfile .lock
+
+		Echo_message "Deconfiguring file /sbin/start-stop-daemon"
+
+		# Restore start-stop-daemon program
+		mv chroot/sbin/start-stop-daemon.org chroot/sbin/start-stop-daemon
+
+		# Removing stage file
+		rm -f .stage/chroot_dpkg
+		;;
+
+	*)
+		Usage
+		;;
+esac


Property changes on: dists/trunk/live-helper/helpers/lh_chroot_dpkg
___________________________________________________________________
Name: svn:executable
   + *




More information about the debian-live-changes mailing list