Install devices using our own device tarball
authorMichael Prokop <devnull@localhost>
Thu, 28 Aug 2008 13:23:31 +0000 (15:23 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 28 Aug 2008 13:23:31 +0000 (15:23 +0200)
debian/changelog
debian/rules
devices.tar.gz [new file with mode: 0644]
grml-debootstrap

index 36157e6..ebc7343 100644 (file)
@@ -20,8 +20,10 @@ grml-debootstrap (0.18) unstable; urgency=low
   * Copy system's /etc/hosts to the target system.
   * Move stages to /var/cache/grml-debootstrap (thanks for the idea,
     gebi).
   * Copy system's /etc/hosts to the target system.
   * Move stages to /var/cache/grml-debootstrap (thanks for the idea,
     gebi).
+  * Install devices using our own device tarball instead of running
+    MAKEDEV (which is just an ungly fork bomb).
 
 
- -- Michael Prokop <mika@grml.org>  Thu, 28 Aug 2008 15:06:48 +0200
+ -- Michael Prokop <mika@grml.org>  Thu, 28 Aug 2008 15:22:57 +0200
 
 grml-debootstrap (0.17) unstable; urgency=low
 
 
 grml-debootstrap (0.17) unstable; urgency=low
 
index d45ae13..991320c 100755 (executable)
@@ -31,6 +31,7 @@ install: build
 
        # Add here commands to install the package into debian/grml-debootstrap.
        install -m 644 config           debian/grml-debootstrap/etc/debootstrap/
 
        # Add here commands to install the package into debian/grml-debootstrap.
        install -m 644 config           debian/grml-debootstrap/etc/debootstrap/
+       install -m 644 devices.tar.gz   debian/grml-debootstrap/etc/debootstrap/
        install -m 644 locale.gen       debian/grml-debootstrap/etc/debootstrap/
        install -m 644 packages         debian/grml-debootstrap/etc/debootstrap/
        install -m 755 chroot-script    debian/grml-debootstrap/etc/debootstrap/
        install -m 644 locale.gen       debian/grml-debootstrap/etc/debootstrap/
        install -m 644 packages         debian/grml-debootstrap/etc/debootstrap/
        install -m 755 chroot-script    debian/grml-debootstrap/etc/debootstrap/
diff --git a/devices.tar.gz b/devices.tar.gz
new file mode 100644 (file)
index 0000000..07dd1cf
Binary files /dev/null and b/devices.tar.gz differ
index 0611494..8488ad8 100755 (executable)
@@ -671,10 +671,10 @@ preparechroot() {
   # make sure we have our files for later use via chroot-script
   cp /etc/debootstrap/config    $MNTPOINT/etc/debootstrap/
   # make sure we adjust the configuration variables accordingly:
   # make sure we have our files for later use via chroot-script
   cp /etc/debootstrap/config    $MNTPOINT/etc/debootstrap/
   # make sure we adjust the configuration variables accordingly:
-  sed -i "s/RELEASE=.*/RELEASE='${RELEASE}'/" $MNTPOINT/etc/debootstrap/config
-  sed -i "s/TARGET=.*/TARGET='${TARGET}'/"    $MNTPOINT/etc/debootstrap/config
-  sed -i "s/GRUB=.*/GRUB='${GRUB}'/"          $MNTPOINT/etc/debootstrap/config
-  sed -i "s/GROOT=.*/GROOT='${GROOT}'/"       $MNTPOINT/etc/debootstrap/config
+  sed -i "s/RELEASE=.*/RELEASE=\"${RELEASE}\"/" $MNTPOINT/etc/debootstrap/config
+  sed -i "s/TARGET=.*/TARGET=\"${TARGET}\"/"    $MNTPOINT/etc/debootstrap/config
+  sed -i "s/GRUB=.*/GRUB=\"${GRUB}\"/"          $MNTPOINT/etc/debootstrap/config
+  sed -i "s/GROOT=.*/GROOT=\"${GROOT}\"/"       $MNTPOINT/etc/debootstrap/config
 
   cp /etc/debootstrap/packages  $MNTPOINT/etc/debootstrap/packages
   cp $CHROOT_VARIABLES          $MNTPOINT/etc/debootstrap/variables # do NOT use $CHROOT_VARIABLES inside chroot!
 
   cp /etc/debootstrap/packages  $MNTPOINT/etc/debootstrap/packages
   cp $CHROOT_VARIABLES          $MNTPOINT/etc/debootstrap/variables # do NOT use $CHROOT_VARIABLES inside chroot!
@@ -693,6 +693,9 @@ preparechroot() {
   # setup default locales
   [ -n "$LOCALES" ] && cp /etc/debootstrap/locale.gen  $MNTPOINT/etc/locale.gen
 
   # setup default locales
   [ -n "$LOCALES" ] && cp /etc/debootstrap/locale.gen  $MNTPOINT/etc/locale.gen
 
+  # MAKEDEV is just a forking bomb crap, let's do it on our own instead :)
+  ( cd $MNTPOINT/dev && tar jxf /etc/debootstrap/devices.tar.gz )
+
   # copy any existing existing files to chroot
   [ -d /etc/debootstrap/boot  ] && cp -a /etc/debootstrap/boot/*  $MNTPOINT/boot/
   [ -d /etc/debootstrap/etc   ] && cp -a /etc/debootstrap/etc/*   $MNTPOINT/etc/
   # copy any existing existing files to chroot
   [ -d /etc/debootstrap/boot  ] && cp -a /etc/debootstrap/boot/*  $MNTPOINT/boot/
   [ -d /etc/debootstrap/etc   ] && cp -a /etc/debootstrap/etc/*   $MNTPOINT/etc/