]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dash compat: use "2>&1" rather than "&>"
authorHarald Hoyer <harald@redhat.com>
Thu, 20 Sep 2012 08:26:14 +0000 (10:26 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 20 Sep 2012 08:26:14 +0000 (10:26 +0200)
modules.d/04watchdog/watchdog.sh
modules.d/90mdraid/module-setup.sh
modules.d/90qemu-net/module-setup.sh
modules.d/90qemu/module-setup.sh
modules.d/96securityfs/securityfs.sh

index a3fdc265d666095a868f328e7d97d34e672ed209..14c92aa55dd24bf9844f59cd79443f5340c7089e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 if [ -e /dev/watchdog ]; then
        if [ ! -e /tmp/watchdog_timeout ]; then
-               wdctl -s 60 /dev/watchdog &>/dev/null
+               wdctl -s 60 /dev/watchdog >/dev/null 2>&1
                > /tmp/watchdog_timeout
        fi
        info "Triggering watchdog"
index 6119226114e981d156224ff20ed0bc14756ff322..3c3f0576fc9baafa004134fdc43b874e03547430 100755 (executable)
@@ -66,10 +66,10 @@ install() {
     inst_rules "$moddir/65-md-incremental-imsm.rules"
 
     # guard against pre-3.0 mdadm versions, that can't handle containers
-    if ! mdadm -Q -e imsm /dev/null &> /dev/null; then
+    if ! mdadm -Q -e imsm /dev/null >/dev/null 2>&1; then
         inst_hook pre-trigger 30 "$moddir/md-noimsm.sh"
     fi
-    if ! mdadm -Q -e ddf /dev/null &> /dev/null; then
+    if ! mdadm -Q -e ddf /dev/null >/dev/null 2>&1; then
         inst_hook pre-trigger 30 "$moddir/md-noddf.sh"
     fi
 
index e6172303fa1ab32975912b9547720b89b0bed9f2..522a7b5a57dacb1a93cd4246841e2dc128942c8c 100755 (executable)
@@ -3,8 +3,8 @@
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
 check() {
-    if type -P systemd-detect-virt &>/dev/null; then
-        vm=$(systemd-detect-virt --vm &>/dev/null)
+    if type -P systemd-detect-virt >/dev/null 2>&1; then
+        vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
         (($? != 0)) && return 255
         [[ $vm = "qemu" ]] && return 0
         [[ $vm = "kvm" ]] && return 0
index fc258ac851340140c3070ac371c5a7452a5582c3..0dbf0818dcbacc52c2c4da97300f04314146608a 100755 (executable)
@@ -3,8 +3,8 @@
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
 check() {
-    if type -P systemd-detect-virt &>/dev/null; then
-        vm=$(systemd-detect-virt --vm &>/dev/null)
+    if type -P systemd-detect-virt >/dev/null 2>&1; then
+        vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
         (($? != 0)) && return 255
         [[ $vm = "qemu" ]] && return 0
         [[ $vm = "kvm" ]] && return 0
index 03ee4dda59c3400bc3c3166e6830f564f67588aa..f6f4b77e05e2d4719a2580f0558914fd2358c9c4 100755 (executable)
@@ -5,6 +5,6 @@
 SECURITYFSDIR="/sys/kernel/security"
 export SECURITYFSDIR
 
-if ! ismounted "${SECURITYFSDIR}"; then
+if ! findmnt "${SECURITYFSDIR}" >/dev/null 2>&1; then
    mount -t securityfs -o nosuid,noexec,nodev securityfs ${SECURITYFSDIR} >/dev/null 2>&1
 fi