Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > f9f77ad9125ad5858971f07a63a92bd4 > files > 28

mkinitrd-net-1.10-32mdv2010.0.src.rpm

--- initrd/linuxrc.udev	2004-09-02 23:04:32.904754852 +0200
+++ initrd/linuxrc	2004-09-02 23:04:32.911754913 +0200
@@ -58,23 +58,33 @@
 fi
 
 if [ -d /sysroot/initrd ]; then
+  $echo Check whether devfs is required
+  if grep 'devfs=mount' /proc/cmdline > /dev/null; then
+    mount=mount
+    umount=umount
+    exec=exec
+  else
+    mount=true
+    umount=true
+    exec=true
+    echo=true
+  fi
   $echo Unmounting /proc prior to pivot_root
   umount /proc
 
   $echo Pivoting root to /sysroot
   pivot_root /sysroot /sysroot/initrd
   cd /
-
   $echo Remounting devfs at correct place
-  mount -t devfs none /dev
+  $mount -t devfs none /dev
 
   $echo Releasing locks on old devfs
-  exec 0</dev/null
-  exec 1>/dev/console
-  exec 2>/dev/console
+  $exec 0</dev/null
+  $exec 1>/dev/console
+  $exec 2>/dev/console
 
   $echo Unmounting old devfs
-  umount /initrd/dev
+  $umount /initrd/dev
 else
   # Failed to mount root: report error and hang
   echo FATAL ERROR: Failed to mount root filesystem
--- initrd/mknbi-set.udev	2004-09-03 01:45:00.281011196 +0200
+++ initrd/mknbi-set	2004-09-03 01:46:15.264660264 +0200
@@ -83,7 +83,11 @@
 my $conffile = '/etc/mknbi-set.conf';
 my $mkinitrd_net = 'mkinitrd-net';
 my $mknbi = 'mknbi-linux';
-$mknbi .= ' --append=devfs=mount' if `/sbin/pidof -s devfsd` gt 0;
+if (`/sbin/pidof -s devfsd` gt 0) {
+   $mknbi .= ' --append=devfs=mount';
+} else {
+   $mknbi .= ' --append=devfs=nomount';
+}
 my $output_dir = '/var/lib/tftpboot';
 my $dhcpfile = '/etc/dhcpd.conf.etherboot-pcimap.include';
 my $use_local;
--- initrd/dhcpd.conf.etherboot.include.udev	2004-09-03 01:46:28.580775811 +0200
+++ initrd/dhcpd.conf.etherboot.include	2004-09-03 01:47:13.715168039 +0200
@@ -103,8 +103,7 @@
 
   # "Sensible" default values for some options
 
-  # Mount devfs (will probably be needed for a network-boot)
-  option etherboot.kernel-cmdline " devfs=mount vga=788";
+  option etherboot.kernel-cmdline " vga=788";
 
   # Info message (includes client IP address, MAC address, hardware ID string,
   # server IP address and name of boot file)