summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-04-29 17:26:29 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-04-29 17:26:29 +0000
commit20b8103dd4ec68d0c5a5429e1f7c4e24edcdb02d (patch)
tree2bd6811bde236de4551079aa284e130e32163ea6 /etc
parent19fde87889bbd89755d708e2a64d00d9a1ccfb41 (diff)
Fix syntax problems, workaround sh bugs
Diffstat (limited to 'etc')
-rw-r--r--etc/etc.sparc/MAKEDEV24
1 files changed, 18 insertions, 6 deletions
diff --git a/etc/etc.sparc/MAKEDEV b/etc/etc.sparc/MAKEDEV
index 70ef3950a96..c5e82faa40f 100644
--- a/etc/etc.sparc/MAKEDEV
+++ b/etc/etc.sparc/MAKEDEV
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: MAKEDEV,v 1.20 1997/04/22 19:06:06 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.21 1997/04/29 17:26:28 niklas Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -115,20 +115,32 @@ SunOS) add ()
{
case $1 in
[0-9]) echo -n $1 ;;
- 1[0-5]) echo -e -n "\\$(( $1 + 131 ))" ;;
+ 10) echo -n a;;
+ 11) echo -n b;;
+ 12) echo -n c;;
+ 13) echo -n d;;
+ 14) echo -n e;;
+ 15) echo -n f;;
esac
}
trunc ()
{
- echo ${1#$2}
+ # XXX pdksh can't seem to deal with locally scoped variables
+ # in ${foo#$bar} expansions
+ arg1="$1"
+ arg2="$2"
+ echo ${arg1#$arg2}
}
unt ()
{
- if [ "${1#xy}" -ne "$1" ]
+ # XXX pdksh can't seem to deal with locally scoped variables
+ # in ${foo#$bar} expansions
+ arg1="$1"
+ if [ "${arg1#xy}" != "$arg1" ]
then
- unt=${1#xy}
+ unt=${arg1#xy}
else
- unt=${1#*d}
+ unt=${arg1#*d}
fi
echo ${unt%*[a-p]}
}