]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: get_fs_env() replaced egrep with shell
authorHarald Hoyer <harald@redhat.com>
Sat, 25 Feb 2012 15:07:45 +0000 (16:07 +0100)
committerHarald Hoyer <harald@redhat.com>
Sat, 25 Feb 2012 16:09:14 +0000 (17:09 +0100)
dracut-functions.sh

index bb0c96fc96887bdc3ee13136750678e2c393b942..9e9ee4e56e48b794c9d98725724a25e2703435b6 100755 (executable)
@@ -168,7 +168,10 @@ get_fs_env() {
     [[ $1 ]] || return
     unset ID_FS_TYPE
     unset ID_FS_UUID
-    eval $(udevadm info --query=env --name=$1|egrep 'ID_FS_(TYPE|UUID)=')
+    eval $(udevadm info --query=env --name=$1 \
+        | while read line; do
+            [[ "$line" =~ 'ID_FS_(TYPE|UUID)=' ]] && echo $line;
+            done)
     [[ $ID_FS_TYPE ]] && return
 
     if [[ -x /lib/udev/vol_id ]]; then