[readonly/geninitrd: 514/1068] - use "read" to get line for /proc files
draenog
draenog at pld-linux.org
Sat Nov 2 19:55:36 CET 2013
commit 3a1d3d887625eaf02daff652f2ea2d60166a50e9
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Nov 6 01:32:41 2007 +0000
- use "read" to get line for /proc files
svn-id: @8997
geninitrd | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index f108205..3213a8d 100755
--- a/geninitrd
+++ b/geninitrd
@@ -1232,7 +1232,7 @@ initrd_gen_nfs() {
EOF
cat <<-'EOF' > "$MNTIMAGE/bin/setdhcp"
- for o in $(cat /proc/cmdline); do
+ for o in $CMDLINE; do
case $o in
nfsroot=*)
rootpath=${o#nfsroot=}
@@ -1319,8 +1319,8 @@ initrd_gen_lvm() {
export LVM_VGVOLUME=$VGVOLUME
EOF
add_linuxrc <<-'EOF'
- # disable noise from lvm accessing devices that aren't ready.
- printk=$(cat /proc/sys/kernel/printk)
+ # disable noise from LVM accessing devices that aren't ready.
+ readk printk < /proc/sys/kernel/printk
echo 0 > /proc/sys/kernel/printk
export LVM_SYSTEM_DIR=/tmp
@@ -1739,7 +1739,7 @@ add_linuxrc <<EOF
EOF
mount_proc
add_linuxrc <<-'EOF'
- export CMDLINE="$(cat /proc/cmdline)"
+ read CMDLINE < /proc/cmdline; export CMDLINE
for arg in $CMDLINE; do
if [ "${arg}" = "debuginitrd" ]; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090
More information about the pld-cvs-commit
mailing list