View | Details | Raw Unified | Return to bug 115133
Collapse All | Expand All

(-)file_not_specified_in_diff (-10 / +21 lines)
Line  Link Here
0
-- a/mkinitrd
0
++ b/mkinitrd
Lines 1126-1131 Link Here
1126
    fi
1126
    fi
1127
    # fill the initrd
1127
    # fill the initrd
1128
    mkdir -p $tmp_mnt/{sbin,bin,etc,dev,proc,sys}
1128
    mkdir -p $tmp_mnt/{sbin,bin,etc,dev,proc,sys}
1129
    mknod $tmp_mnt/dev/console c 5 1
1130
    mknod $tmp_mnt/dev/null c 1 3
1129
1131
1130
    # Create a dummy /etc/mtab for mount/umount
1132
    # Create a dummy /etc/mtab for mount/umount
1131
    echo -n > $tmp_mnt/etc/mtab
1133
    echo -n > $tmp_mnt/etc/mtab
Lines 1230-1237 Link Here
1230
	  fi
1232
	  fi
1231
	done
1233
	done
1232
	mkdir -p $tmp_mnt/lib/klibc/sbin
1234
	mkdir -p $tmp_mnt/lib/klibc/sbin
1233
	for klibc_bin in ata_id scsi_id usb_id \
1235
	for klibc_bin in ata_id scsi_id usb_id vol_id dasd_id; do
1234
	    vol_id; do
1235
	  cp_bin /lib/klibc/sbin/$klibc_bin \
1236
	  cp_bin /lib/klibc/sbin/$klibc_bin \
1236
	    $tmp_mnt/lib/klibc/sbin
1237
	    $tmp_mnt/lib/klibc/sbin
1237
	  if [ ! -e $tmp_mnt/sbin/$klibc_bin ]; then
1238
	  if [ ! -e $tmp_mnt/sbin/$klibc_bin ]; then
Lines 1266-1273 Link Here
1266
	cp_bin /usr/share/mkinitrd/hotplug.sh $tmp_mnt/sbin/hotplug.sh
1267
	cp_bin /usr/share/mkinitrd/hotplug.sh $tmp_mnt/sbin/hotplug.sh
1267
    fi
1268
    fi
1268
1269
1269
    # all dev nodes belong to root, according to udev.permissions
1270
    # all dev nodes belong to root, but some may be
1270
    # but some may be owned by a group other than root
1271
    # owned by a group other than root
1271
    # getent passwd | sed '/^root:/s/^\([^:]\+\):[^:]*:\([^:]\+\):\([^:]\+\):.*/\1::\2:\3:::/p;d' > $tmp_mnt/etc/passwd
1272
    # getent passwd | sed '/^root:/s/^\([^:]\+\):[^:]*:\([^:]\+\):\([^:]\+\):.*/\1::\2:\3:::/p;d' > $tmp_mnt/etc/passwd
1272
    echo 'root::0:0:::' > $tmp_mnt/etc/passwd
1273
    echo 'root::0:0:::' > $tmp_mnt/etc/passwd
1273
    getent group | sed 's/^\([^:]\+\):[^:]*:\([^:]\+\):.*/\1::\2:/' > $tmp_mnt/etc/group
1274
    getent group | sed 's/^\([^:]\+\):[^:]*:\([^:]\+\):.*/\1::\2:/' > $tmp_mnt/etc/group
Lines 1359-1369 Link Here
1359
	echo "udev_root=\"/dev\"" > $tmp_mnt/etc/udev/udev.conf
1360
	echo "udev_root=\"/dev\"" > $tmp_mnt/etc/udev/udev.conf
1360
	echo "udev_db=\"/dev/.udevdb\"" >> $tmp_mnt/etc/udev/udev.conf
1361
	echo "udev_db=\"/dev/.udevdb\"" >> $tmp_mnt/etc/udev/udev.conf
1361
	echo "udev_rules=\"/etc/udev/rules.d\"" >> $tmp_mnt/etc/udev/udev.conf
1362
	echo "udev_rules=\"/etc/udev/rules.d\"" >> $tmp_mnt/etc/udev/udev.conf
1362
	cp /etc/udev/rules.d/* $tmp_mnt/etc/udev/rules.d
1363
	cp /etc/udev/rules.d/*.rules $tmp_mnt/etc/udev/rules.d
1363
	# comment out binaries not available in initrd
1364
	for file in $tmp_mnt/etc/udev/rules.d/*; do
1365
		sed 's@\(.*/usr/.*\)@#(mkinitrd) \1@g' -i $file
1366
	done
1367
    fi
1364
    fi
1368
1365
1369
    if [ "$mkinit_type" = "ramfs" ] ; then
1366
    if [ "$mkinit_type" = "ramfs" ] ; then
Lines 1525-1530 Link Here
1525
	fi
1522
	fi
1526
    fi
1523
    fi
1527
1524
1525
    if [ -n "$use_udev" ] ; then
1526
	# comment out rules with tools not available in initramfs
1527
	for tool in $(sed 's:.*"\(/.*bin/[^ "]*\).*:\1:' /etc/udev/rules.d/*.rules | grep '^/.*bin/' | sort -u); do
1528
		if [ -x "$tmp_mnt$tool" ]; then
1529
			# tool exists, keep the rule
1530
			continue
1531
		fi
1532
		# comment out all rules using this tool
1533
		for file in $tmp_mnt/etc/udev/rules.d/*.rules; do
1534
			sed "s@\(.*$tool.*\)@#(mkinitrd) \1@" -i $file
1535
		done;
1536
	done
1537
    fi
1538
1528
    cat /dev/null > $linuxrc
1539
    cat /dev/null > $linuxrc
1529
    chmod 755 $linuxrc
1540
    chmod 755 $linuxrc
1530
1541

Return to bug 115133