From 8cec588c449f00982159304c76482d87d5194f0d Mon Sep 17 00:00:00 2001 From: sheldonh Date: Wed, 25 Aug 1999 16:01:45 +0000 Subject: 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 --- etc/pccard_ether | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'etc/pccard_ether') 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 -- cgit v1.1