r2761 - in people/daniel/installer-initramfs: . debian hooks manpages scripts

daniel at alioth.debian.org daniel at alioth.debian.org
Tue Aug 14 08:52:52 UTC 2007


Author: daniel
Date: 2007-08-14 08:52:52 +0000 (Tue, 14 Aug 2007)
New Revision: 2761

Modified:
   people/daniel/installer-initramfs/Makefile
   people/daniel/installer-initramfs/debian/control
   people/daniel/installer-initramfs/hooks/installer
   people/daniel/installer-initramfs/manpages/installer-initramfs.7
   people/daniel/installer-initramfs/scripts/installer
   people/daniel/installer-initramfs/scripts/installer-functions
Log:


Modified: people/daniel/installer-initramfs/Makefile
===================================================================
--- people/daniel/installer-initramfs/Makefile	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/Makefile	2007-08-14 08:52:52 UTC (rev 2761)
@@ -5,7 +5,7 @@
 all: build
 
 test:
-	set -e; for SCRIPT in bin/* hooks/* scripts/installer scripts/installer-functions scripts/installer-helpers scripts/*/*; \
+	set -e; for SCRIPT in bin/* hooks/* scripts/installer scripts/installer-functions scripts/*/*; \
 	do \
 		sh -n $$SCRIPT; \
 	done

Modified: people/daniel/installer-initramfs/debian/control
===================================================================
--- people/daniel/installer-initramfs/debian/control	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/debian/control	2007-08-14 08:52:52 UTC (rev 2761)
@@ -9,7 +9,7 @@
 
 Package: installer-initramfs
 Architecture: all
-Depends: ${misc:Depends}, cdebootstrap | debootstrap, initramfs-tools, parted, rsync
+Depends: ${misc:Depends}, cdebootstrap | debootstrap, initramfs-tools, parted, rsync, wget
 Description: Installer initramfs hook
  installer-initramfs is a hook for the initramfs-tools, used to install a Debian
  system in an alternative way.

Modified: people/daniel/installer-initramfs/hooks/installer
===================================================================
--- people/daniel/installer-initramfs/hooks/installer	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/hooks/installer	2007-08-14 08:52:52 UTC (rev 2761)
@@ -32,7 +32,6 @@
 
 # Scripts
 cp /usr/share/initramfs-tools/scripts/installer-functions "${DESTDIR}"/scripts
-cp /usr/share/initramfs-tools/scripts/installer-helpers "${DESTDIR}"/scripts
 
 # Handling other stuff
 
@@ -52,13 +51,22 @@
 auto_add_modules net
 
 # Program: cdebootstrap
-copy_exec /usr/bin/cdebootstrap /bin
+if [ -f /usr/bin/cdebootstrap ]
+then
+	copy_exec /usr/bin/cdebootstrap /bin
+fi
 
 # Program: debootstrap
-copy_exec /usr/sbin/debootstrap /sbin
+if [ ! -f /usr/bin/cdebootstrap ] && [ -f /usr/sbin/debootstrap ]
+then
+	copy_exec /usr/sbin/debootstrap /sbin
+fi
 
 # Program: parted
 copy_exec /sbin/parted /sbin
 
 # Program: rsync
 copy_exec /usr/bin/rsync /bin
+
+# Program: wget
+copy_exec /usr/bin/wget /bin

Modified: people/daniel/installer-initramfs/manpages/installer-initramfs.7
===================================================================
--- people/daniel/installer-initramfs/manpages/installer-initramfs.7	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/manpages/installer-initramfs.7	2007-08-14 08:52:52 UTC (rev 2761)
@@ -12,6 +12,10 @@
 
 .SH BOOT OPTIONS
 Here is the complete list of recognized boot parameters by installer\-initramfs.
+.TP "boot=installer" 4
+This enables the installer.
+.TP "installer-config=\fIURL\fR" 4
+This specifies the installer configuration file.
 
 .SH SEE ALSO
 \fIinitramfs\-tools\fR(8)

Modified: people/daniel/installer-initramfs/scripts/installer
===================================================================
--- people/daniel/installer-initramfs/scripts/installer	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/scripts/installer	2007-08-14 08:52:52 UTC (rev 2761)
@@ -7,15 +7,9 @@
 
 export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
 
-echo "/root/lib" >> /etc/ld.so.conf
-echo "/root/usr/lib" >> /etc/ld.so.conf
-
 mountpoint="/target"
-
 mkdir -p "${mountpoint}"
 
-. /scripts/live-helpers
-
 Arguments ()
 {
 	PRESEEDS=""
@@ -23,23 +17,11 @@
 	for ARGUMENT in `cat /proc/cmdline`
 	do
 		case "${ARGUMENT}" in
-			url=*)
-				location="${ARGUMENT#url=}"
+			installer-config=*)
+				CONFIG="${ARGUMENT#installer-config=}"
 
-				mount -n -o bind /sys /root/sys
-				mount -n -o bind /proc /root/proc
-				mount -n -o bind /dev /root/dev
-
-				mkdir -p /root/var/run/network
-				chroot /root ifup -a
-				chroot /root wget -P /tmp "$location"
-				chroot /root ifdown -a
-
-				umount /root/sys
-				umount /root/proc
-				umount /root/dev
-
-				LOCATION="/tmp/$(basename "$location")"
+				wget -P /tmp "${CONFIG}"
+				. /tmp/"${CONFIG}"
 				;;
 		esac
 	done

Modified: people/daniel/installer-initramfs/scripts/installer-functions
===================================================================
--- people/daniel/installer-initramfs/scripts/installer-functions	2007-08-14 08:40:50 UTC (rev 2760)
+++ people/daniel/installer-initramfs/scripts/installer-functions	2007-08-14 08:52:52 UTC (rev 2761)
@@ -1,35 +1,26 @@
+#!/bin/sh
 
 . /scripts/functions
-. /live.vars
 
 # Override this so we don't call PROGRESS
-log_end_msg()
+log_end_msg ()
 {
-	if [ -x /sbin/usplash_write ]; then
+	if [ -x /sbin/usplash_write ]
+	then
 		/sbin/usplash_write "SUCCESS ok"
 	fi
+
 	_log_msg "Done."
 }
 
 # Print a message and wait for enter
-log_wait_msg()
+log_wait_msg ()
 {
-	if [ -x /sbin/usplash_write ]; then
-		/sbin/usplash_write "INPUTENTER $@"
+	if [ -x /sbin/usplash_write ]
+	then
+		/sbin/usplash_write "INPUTENTER ${@}"
 		read nunya < /dev/.initramfs/usplash_outfifo
 	fi
-	_log_msg "Waiting: $@ ..."
-}
 
-really_export ()
-{
-    STRING="${1}"
-    VALUE="$(eval echo -n \${$STRING})"
-
-    if [ -f /live.vars ] && cat /live.vars | grep -sq "export ${STRING}" ; then
-        sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
-    else
-        echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
-    fi
-    eval export "${STRING}"="${VALUE}"
+	_log_msg "Waiting: ${@} ..."
 }




More information about the debian-live-changes mailing list