For whatever reason, the number-of-arguments checking doesn't work for many
of the scripts.  It works the first time the script is run per bash
instance.  If someone has a fix for that, that'd be great.

Check your own, non-version-controlled scripts.

Signed-off-by: Barret Rhoden <[email protected]>
---
 kern/kfs/bin/init.sh | 2 +-
 kern/kfs/bin/m       | 4 ++--
 kern/kfs/bin/ps      | 2 +-
 kern/kfs/lockprov.sh | 4 ++--
 kern/kfs/looper.sh   | 4 ++--
 kern/kfs/mountroot   | 6 +++---
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/kern/kfs/bin/init.sh b/kern/kfs/bin/init.sh
index e9673b2aef0a..855fc1afb072 100644
--- a/kern/kfs/bin/init.sh
+++ b/kern/kfs/bin/init.sh
@@ -1,2 +1,2 @@
 # This is the default init script.
-/bin/ash
+/bin/bash
diff --git a/kern/kfs/bin/m b/kern/kfs/bin/m
index c4226f7dd0cd..0b756a74bbfb 100644
--- a/kern/kfs/bin/m
+++ b/kern/kfs/bin/m
@@ -1,6 +1,6 @@
-#!/bin/ash
+#!/bin/bash
 
-if [ $# -lt 1 ]
+if [[ $# -lt 1 ]]
 then
        echo Usage: $0 CMDS TO KERNEL MONITOR...
        exit
diff --git a/kern/kfs/bin/ps b/kern/kfs/bin/ps
index 95209a2607eb..fcadb840afbc 100755
--- a/kern/kfs/bin/ps
+++ b/kern/kfs/bin/ps
@@ -1,4 +1,4 @@
-#!/bin/ash
+#!/bin/bash
 for i in `echo '#proc/*/status'`
 do
 cat $i
diff --git a/kern/kfs/lockprov.sh b/kern/kfs/lockprov.sh
index 4a134a98f583..cd0243cf7538 100644
--- a/kern/kfs/lockprov.sh
+++ b/kern/kfs/lockprov.sh
@@ -1,4 +1,4 @@
-#!/bin/ash
+#!/bin/bash
 
 # will run lock_test with whatever arguments are passed in.  default arguments
 # are -wMAX_VCORES and -l10000.
@@ -12,7 +12,7 @@
 #
 # Run this from looper.sh for multiple runs.
 
-if [ $# -lt 2 ]
+if [[ $# -lt 2 ]]
 then
        echo Usage: $0 PREEMPT_DELAY_USEC ARGS_FOR_LOCK_TEST
        exit
diff --git a/kern/kfs/looper.sh b/kern/kfs/looper.sh
index 86952ec57dcf..c634d25062c7 100755
--- a/kern/kfs/looper.sh
+++ b/kern/kfs/looper.sh
@@ -1,6 +1,6 @@
-#!/bin/ash
+#!/bin/bash
 
-if [ $# -lt 1 ] ; then
+if [[ $# -lt 1 ]] ; then
        echo "Need an app!"
        exit 
 fi
diff --git a/kern/kfs/mountroot b/kern/kfs/mountroot
index 80e406907656..76710eccb821 100755
--- a/kern/kfs/mountroot
+++ b/kern/kfs/mountroot
@@ -1,4 +1,4 @@
-#!/bin/ash
+#!/bin/bash
 #
 # root [[REMOTE_NAME] [SRVNAME]]
 #
@@ -8,13 +8,13 @@
 # when run with no args, this will also ifconfig and mount ufs for qemu
 
 REMOTE=qemu
-if [ "$#" -ge "1" ]
+if [[ "$#" -ge "1" ]]
 then
        REMOTE=$1
 fi
 
 SRVNAME=$REMOTE-ufs
-if [ "$#" -ge "2" ]
+if [[ "$#" -ge "2" ]]
 then
        SRVNAME=$2
 fi
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to