Package: initrd-netboot-tools
Version: 0.5.3cvs.20040906-16
Severity: minor
Tags: patch

Hello,

today I've spend some hours on tracking some weird error messages if
busybox is enabled in /etc/mkinitrd/mkinitrd.conf:

cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//usr/bin/cut': No such file or directory
cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//sbin/ifconfig': No such file or directory
cp: cannot create regular file `/tmp/mkinitrd.82xcVX/initrd//bin/grep':
No such file or directory
cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//usr/bin/head': No such file or directory
cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//bin/hostname': No such file or directory
cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//usr/bin/tr': No such file or directory
cp: cannot create regular file
`/tmp/mkinitrd.82xcVX/initrd//sbin/route': No such file or directory

I discovered that these messages are not really an error (the built
initrd is just fine). The error is caused by already existing symlinks
to busybox which isn't in the place (/bin2/busybox) the symlink points
to during build of the initrd.

I attached a patch for /etc/mkinitrd/scripts/netboot (appliable to the
netboot script of initrd-netboot-tools 0.5.3cvs.20040906-16) which lets
the netboot script detect those cases and print out a notice instead of
copying and failing. If you think that this notice might confuse other
users just skip the else clause in the added code. :-)

Yours
  Micha

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages initrd-netboot-tools depends on:
ii  initrd-tools                  0.1.81.1   tools to create initrd image for p

-- no debconf information
--- netboot.orig        2006-01-28 01:31:22.737829192 +0100
+++ netboot     2006-01-28 01:35:21.852478240 +0100
@@ -62,8 +62,12 @@
 
 copy_initrd_file(){
   filename="$1"
-  mkdir -p "$(dirname $INITRDDIR/$filename)"
-  cp -a "$filename" "$INITRDDIR/$filename"
+  if [ ! -L $INITRDDIR/$filename ]; then
+    mkdir -p "$(dirname $INITRDDIR/$filename)"
+    cp -a "$filename" "$INITRDDIR/$filename"
+  else
+    echo "NOTICE: Skipping copying of $filename, destination is a symbolic 
link to $(readlink $INITRDDIR/$filename)"
+  fi
 }
 
 # hard-code these two, so old debconf values don't bite us

Reply via email to