[readonly/geninitrd: 502/1068] - call mount_proc only once
draenog
draenog at pld-linux.org
Sat Nov 2 19:54:36 CET 2013
commit 798f28b1530f60efa6c0916542110b6c1860eba3
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Sat Nov 3 14:26:12 2007 +0000
- call mount_proc only once
svn-id: @8978
geninitrd | 11 -----------
1 file changed, 11 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index a636f26..57ac84e 100755
--- a/geninitrd
+++ b/geninitrd
@@ -9,7 +9,6 @@
# TODO:
# - make udev start before insmods
# - make proper use of USE_UDEV - don't copy fules if USE_UDEV is off no!
-# - sanitize - one mounting of /proc and /sys at the begining and one umount at the end!
#
RCSID='$Id$'
@@ -928,7 +927,6 @@ EOF
inst /lib/firmware/$firmware /lib/firmware/$firmware
done
- mount_proc
mount_sys
echo "echo -n "/lib/firmware/firmware.sh" > /proc/sys/kernel/hotplug" | add_linuxrc
}
@@ -1400,7 +1398,6 @@ initrd_gen_suspend() {
initrd_gen_tuxonice() {
inst_d /sys /proc
- mount_proc
mount_sys
add_linuxrc <<-'EOF'
if [ "$(echo "$CMDLINE" | awk ' /resume2=/ { print "yes"; } ' /proc/cmdline)" = "yes" ]; then
@@ -1456,7 +1453,6 @@ initrd_gen_multipath() {
inst /var/lib/multipath/bindings /var/lib/multipath
fi
- mount_proc
mount_dev
initrd_gen_devices
@@ -1483,7 +1479,6 @@ initrd_gen_dmraid() {
inst /sbin/dmraid-initrd /sbin/dmraid
mount_dev
- mount_proc
mount_sys
initrd_gen_devices
add_linuxrc <<-EOF
@@ -1556,7 +1551,6 @@ initrd_gen_devices() {
fi
proc_partitions=yes
- mount_proc
mount_dev
add_linuxrc <<-'EOF'
: 'Making device nodes'
@@ -1646,8 +1640,6 @@ initrd_gen_nfs() {
fi
EOF
- mount_proc
-
cat <<-'EOF' > "$MNTIMAGE/bin/setdhcp"
for o in $(cat /proc/cmdline); do
case $o in
@@ -1695,7 +1687,6 @@ initrd_gen_lvm() {
done
fi
- mount_proc
mount_tmp
if [ "$LVMTOOLSVERSION" = "1" ]; then
add_linuxrc <<-EOF
@@ -1776,7 +1767,6 @@ initrd_gen_lvm() {
initrd_gen_procdata() {
debug "Adding rootfs finding based on root= option support."
inst_d /proc
- mount_proc
add_linuxrc <<-'EOF'
root="$(busybox awk ' /root=\/dev\// { gsub(/.*root=\/dev\//,NIL,$0); gsub(/ .*/,NIL,$0); print $0; } ' /proc/cmdline)"
if [ -n "$root" ]; then
@@ -1832,7 +1822,6 @@ if [ "$INITRDFS" = "initramfs" ]; then
[ ! -e "$MNTIMAGE/$rootdev" ] && inst $rootdev /dev
# Parsing root parameter
# We support passing root as hda3 /dev/hda3 0303 0x0303 and 303
- mount_proc
add_linuxrc <<-'EOF'
eval "$(busybox awk -v c="$CMDLINE" '
BEGIN {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090
More information about the pld-cvs-commit
mailing list