debian-installer/rootskel/src/sbin init,1.2,1.3
Update of /cvs/debian-boot/debian-installer/rootskel/src/sbin
In directory gluck:/tmp/cvs-serv17182/src/sbin
Modified Files:
init
Log Message:
Let src/sbin/init panic on errors, and rewrite it a bit more efficiently.
Index: init
===================================================================
RCS file: /cvs/debian-boot/debian-installer/rootskel/src/sbin/init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- init 18 Oct 2003 20:31:23 -0000 1.2
+++ init 9 Dec 2003 21:38:29 -0000 1.3
@@ -1,14 +1,13 @@
-#!/bin/sh
+#!/bin/sh -e
# Set up filesystem as root and pivot into it.
echo "Setting up filesystem, please wait ..."
mount -t shm shm mnt
-cp -a `ls -1 | grep -v mnt | grep -v proc | grep -v dev | grep -v lost+found` mnt
+cp -a $(ls -1 / |grep -v '\(dev\|lost+found\|mnt\|proc\)') /mnt
cd mnt
mkdir proc dev
pivot_root . initrd
mount -t proc proc proc
mount -t devfs devfs dev
# Close all open files on the initrd, and run busybox init.
-rm -f sbin/init # this program
-ln -s ../bin/busybox sbin/init
+ln -sf ../bin/busybox sbin/init
exec /usr/sbin/chroot . /sbin/init <dev/console >dev/console 2>&1
Reply to: