summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-01-11 03:03:08 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-01-11 03:03:08 +0100
commit62e4f1a11b4598daa4a22fe3b868fde3c6fa818e (patch)
treee3f8a55489cb4a5fa8b15bc0b10d202f47feddcc
parent5de5cbd1a1852aca1169deaa622dc900fdf064bc (diff)
Make MAKEDEV bash-free
* sutils/MAKEDEV.sh (cmd, st, lose, mkdev): Remove function, add (). (mkdev): Use ${I#???} instead of ${I:3}.
-rw-r--r--sutils/MAKEDEV.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh
index 260e93bf..4277b052 100644
--- a/sutils/MAKEDEV.sh
+++ b/sutils/MAKEDEV.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Make standard devices
#
@@ -51,12 +51,12 @@ case "$#" in 0)
exit 1;;
esac
-function cmd {
+cmd() {
eval $ECHO "$@"
eval $EXEC "$@"
}
-function st {
+st() {
local NODE="$1"
local OWNER="$2"
local PERM="$3"
@@ -68,7 +68,7 @@ function st {
fi
}
-function lose {
+lose() {
local line
for line; do
echo 1>&2 "$0: $line"
@@ -76,7 +76,7 @@ function lose {
exit 1
}
-function mkdev {
+mkdev() {
local I
for I; do
case $I in
@@ -120,7 +120,7 @@ function mkdev {
# ptys
[pt]ty[pqrstuvwxyzPQRS]?)
# Make one pty, both the master and slave halves.
- local id="${I:3}"
+ local id="${I#???}"
st pty$id root 666 /hurd/term ${DEVDIR}/pty$id \
pty-master ${DEVDIR}/tty$id
st tty$id root 666 /hurd/term ${DEVDIR}/tty$id \