summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-08-25 16:01:45 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-08-25 16:01:45 +0000
commit8cec588c449f00982159304c76482d87d5194f0d (patch)
treec5b950c555128460f4c0f03bc9b54c807a922506 /etc/pccard_ether
parentde5fc0125907bb6de177202bfa1b843589e80011 (diff)
downloadFreeBSD-src-8cec588c449f00982159304c76482d87d5194f0d.zip
FreeBSD-src-8cec588c449f00982159304c76482d87d5194f0d.tar.gz
Style clean-up:
* All variables are now embraced: ${foo} * All comparisons against some value now take the form: [ "${foo}" ? "value" ] where ? is a comparison operator * All empty string tests now take the form: [ -z "${foo}" ] * All non-empty string tests now take the form: [ -n "${foo}" ] Submitted by: jkh
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-xetc/pccard_ether12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index 45f95a6..3f6ab7f 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: pccard_ether,v 1.10 1999/02/10 18:08:16 jkh Exp $
+# $Id: pccard_ether,v 1.11 1999/02/22 02:55:18 steve Exp $
#
# pccard_ether interfacename [ifconfig option]
#
@@ -14,8 +14,8 @@ elif [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
-if [ "x$pccard_ifconfig" != "xNO" ] ; then
- if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
+if [ "${pccard_ifconfig}" != "NO" ] ; then
+ if [ "${pccard_ifconfig}" = "DHCP" ] ; then
if [ -f /sbin/dhclient ] ; then
if [ -s /var/run/dhclient.pid ] ; then
kill `cat /var/run/dhclient.pid`
@@ -34,17 +34,17 @@ if [ "x$pccard_ifconfig" != "xNO" ] ; then
else
interface=$1
shift
- ifconfig $interface $pccard_ifconfig $*
+ ifconfig ${interface} ${pccard_ifconfig} $*
fi
fi
-if [ "x$defaultrouter" != "xNO" ] ; then
+if [ "${defaultrouter}" != "NO" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
# Set up any static routes.
-if [ "x${static_routes}" != "x" ]; then
+if [ -n "${static_routes}" ]; then
# flush beforehand, just in case....
route -n flush
arp -d -a
OpenPOWER on IntegriCloud