[Debian-live-changes] r1129 - configs/daniel/config/chroot_localincludes/usr/local/bin

Daniel Baumann daniel at alioth.debian.org
Sun Apr 22 19:55:20 UTC 2007


Author: daniel
Date: 2007-04-22 19:55:20 +0000 (Sun, 22 Apr 2007)
New Revision: 1129

Modified:
   configs/daniel/config/chroot_localincludes/usr/local/bin/cdebootstraps
Log:


Modified: configs/daniel/config/chroot_localincludes/usr/local/bin/cdebootstraps
===================================================================
--- configs/daniel/config/chroot_localincludes/usr/local/bin/cdebootstraps	2007-04-22 19:31:44 UTC (rev 1128)
+++ configs/daniel/config/chroot_localincludes/usr/local/bin/cdebootstraps	2007-04-22 19:55:20 UTC (rev 1129)
@@ -39,6 +39,11 @@
 		DISTRIBUTION="${CODENAME_OLDSTABLE}"
 		;;
 
+	oldstable|"${CODENAME_OLDSTABLE}")
+		CHROOT="${DIRECTORY_CHROOT}/${CODENAME_OLDSTABLE}"
+		DISTRIBUTION="${CODENAME_OLDSTABLE}"
+		;;
+
 	stable-backports|"${CODENAME_STABLE}"-backports)
 		CHROOT="${DIRECTORY_CHROOT}/${CODENAME_STABLE}-backports"
 		DISTRIBUTION="${CODENAME_STABLE}"
@@ -73,16 +78,16 @@
 	uninstall)
 		# Unmounting file system
 		fuser -km "${CHROOT}"
-		killall -9 syslogd
-		killall -9 klogd
+		killall -9 syslogd || true
+		killall -9 klogd || true
 
-		umount "${CHROOT}"/sys
-		umount "${CHROOT}"/proc
-		umount "${CHROOT}"/lib/init/rw
-		umount "${CHROOT}"/dev/shm
-		umount "${CHROOT}"/dev/pts
-		umount "${CHROOT}"/dev
-		umount "${CHROOT}"
+		umount "${CHROOT}"/sys || true
+		umount "${CHROOT}"/proc || true
+		umount "${CHROOT}"/lib/init/rw || true
+		umount "${CHROOT}"/dev/shm || true
+		umount "${CHROOT}"/dev/pts || true
+		umount "${CHROOT}"/dev || true
+		umount "${CHROOT}" || true
 
 		# Removing directory
 		rm -rf "${CHROOT}"
@@ -94,6 +99,7 @@
 
 		# Bootstrapping chroot
 		cdebootstrap ${DISTRIBUTION} ${CHROOT} ${MIRROR}
+		rm -rf ${CHROOT}/var/cache/bootstrap
 		;;
 
 	configure)
@@ -196,16 +202,16 @@
 		;;
 
 	save)
-		killall -9 syslogd
-		killall -9 klogd
+		killall -9 syslogd || true
+		killall -9 klogd || true
 
 		# Unmounting file systems
-		umount "${CHROOT}"/sys
-		umount "${CHROOT}"/proc
-		umount "${CHROOT}"/lib/init/rw
-		umount "${CHROOT}"/dev/shm
-		umount "${CHROOT}"/dev/pts
-		umount "${CHROOT}"/dev
+		umount "${CHROOT}"/sys || true
+		umount "${CHROOT}"/proc || true
+		umount "${CHROOT}"/lib/init/rw || true
+		umount "${CHROOT}"/dev/shm || true
+		umount "${CHROOT}"/dev/pts || true
+		umount "${CHROOT}"/dev || true
 
 		# Cleaning home directories
 		rm -f "${CHROOT}"/root/.bash_history
@@ -222,16 +228,16 @@
 		;;
 
 	restore)
-		killall -9 syslogd
-		killall -9 klogd
+		killall -9 syslogd || true
+		killall -9 klogd || true
 
 		# Unmounting file systems
-		umount "${CHROOT}"/sys
-		umount "${CHROOT}"/proc
-		umount "${CHROOT}"/lib/init/rw
-		umount "${CHROOT}"/dev/shm
-		umount "${CHROOT}"/dev/pts
-		umount "${CHROOT}"/dev
+		umount "${CHROOT}"/sys || true
+		umount "${CHROOT}"/proc || true
+		umount "${CHROOT}"/lib/init/rw || true
+		umount "${CHROOT}"/dev/shm || true
+		umount "${CHROOT}"/dev/pts || true
+		umount "${CHROOT}"/dev || true
 
 		# Restoring chroot
 		rsync -av --delete "${CHROOT}".snapshot/ "${CHROOT}"
@@ -241,9 +247,9 @@
 		;;
 
 	reset)
-		"${0}" ${DISTRIBUTION} restore
-		"${0}" ${DISTRIBUTION} update
-		"${0}" ${DISTRIBUTION} save
+		"${0}" restore ${DISTRIBUTION}
+		"${0}" update ${DISTRIBUTION}
+		"${0}" save ${DISTRIBUTION}
 		;;
 esac
 




More information about the Debian-live-changes mailing list