]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
(lvm detection): Remove head command usage - do it with awk only.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 16 May 2004 16:14:04 +0000 (16:14 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 16 May 2004 16:14:04 +0000 (16:14 +0000)
svn-id: @4065

rc.d/rc.sysinit

index 494d62023bdb9561946357a6ee7e3d15d7620e52..ca676eb7e47dcc0eda8210f3a41ba651f8ab7e2e 100755 (executable)
@@ -451,7 +451,7 @@ if [ -x /sbin/evms_activate ]; then
 fi
 # LVM
 if is_yes "$EVMS_LVM" || [ -x /sbin/vgscan -a -x /sbin/vgchange ]; then
-       lvmversion=$(/sbin/vgchange --version 2>/dev/null|head -n 1|awk '{gsub("vgchange: Logical Volume Manager ",""); gsub("LVM version:     ",""); gsub(/\..*/,"");print $1}')
+       lvmversion=$(/sbin/vgchange --version 2>/dev/null | awk '{gsub("vgchange: Logical Volume Manager ",""); gsub("LVM version:     ",""); gsub(/\..*/,"");print $1; exit}')
        if [ "$lvmversion" = "1" ] ; then
                modprobe -s -k lvm-mod >/dev/null 2>&1
                lvmignorelock=""
This page took 0.031785 seconds and 4 git commands to generate.