Author: dnicholson
Date: 2006-10-01 11:39:12 -0600 (Sun, 01 Oct 2006)
New Revision: 6325
Modified:
trunk/bootscripts/blfs/sysconfig/network-devices/services/dhcpcd
Log:
Consistent use of tabs in dhcpcd service script.
Modified: trunk/bootscripts/blfs/sysconfig/network-devices/services/dhcpcd
===================================================================
--- trunk/bootscripts/blfs/sysconfig/network-devices/services/dhcpcd
2006-10-01 17:16:32 UTC (rev 6324)
+++ trunk/bootscripts/blfs/sysconfig/network-devices/services/dhcpcd
2006-10-01 17:39:12 UTC (rev 6325)
@@ -16,22 +16,22 @@
LEASEINFO="/var/lib/dhcpc/dhcpcd-$1.info"
case "$2" in
- up)
- boot_mesg -n "Starting dhcpcd on the $1 interface..."
- # Test to see if there is a stale pid file
- if [ -f "$PIDFILE" ]
- then
- ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
- if [ $? != 0 ]
- then
- rm -f /var/run/dhcpcd-$1.pid > /dev/null
- else
- boot_mesg "dhcpcd already running!" ${WARNING}
- echo_warning
- exit 2
- fi
- fi
- /sbin/dhcpcd $1 $DHCP_START
+ up)
+ boot_mesg -n "Starting dhcpcd on the $1 interface..."
+ # Test to see if there is a stale pid file
+ if [ -f "$PIDFILE" ]
+ then
+ ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
+ if [ $? != 0 ]
+ then
+ rm -f /var/run/dhcpcd-$1.pid > /dev/null
+ else
+ boot_mesg "dhcpcd already running!" ${WARNING}
+ echo_warning
+ exit 2
+ fi
+ fi
+ /sbin/dhcpcd $1 $DHCP_START
# Save the return value
RET="$?"
# Print the assigned settings if requested
@@ -59,54 +59,54 @@
$(exit "$RET")
evaluate_retval
fi
- ;;
+ ;;
- down)
+ down)
boot_mesg -n "Stopping dhcpcd on the $1 interface..."
# Do nothing with the client daemon if we have an infinate
# lease time as the client exits when started in this case,
# just echo OK.
if [ -e $LEASEINFO ]
then
- . $LEASEINFO
+ . $LEASEINFO
- if [ "$LEASETIME" = "4294967295" ]
- then
- # do nothing, just echo ok
- echo ""
- echo_ok
- else
- if [ -n "$DHCP_STOP" ]
+ if [ "$LEASETIME" = "4294967295" ]
then
- /sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
- RET="$?"
- if [ "$RET" -eq 0 ]; then
+ # do nothing, just echo ok
echo ""
echo_ok
- elif [ "$RET" -eq 1 ]; then
- boot_mesg "dhcpcd not running!" ${WARNING}
- echo_warning
- else
+ else
+ if [ -n "$DHCP_STOP" ]
+ then
+ /sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
+ RET="$?"
+ if [ "$RET" -eq 0 ]; then
+ echo ""
+ echo_ok
+ elif [ "$RET" -eq 1 ]; then
+ boot_mesg "dhcpcd not running!"
${WARNING}
+ echo_warning
+ else
+ echo ""
+ echo_failure
+ fi
+ else
echo ""
- echo_failure
- fi
- else
- echo ""
- killproc dhcpcd
+ killproc dhcpcd
fi
fi
else
- boot_mesg -n "LEASEINFO Test failed! - " ${WARNING}
- boot_mesg "dhcpcd is not running!" ${WARNING}
- echo_warning
- exit 1
+ boot_mesg -n "LEASEINFO Test failed! - " ${WARNING}
+ boot_mesg "dhcpcd is not running!" ${WARNING}
+ echo_warning
+ exit 1
fi
- ;;
+ ;;
- *)
- echo "Usage: $0 [interface] {up|down}"
- exit 1
- ;;
+ *)
+ echo "Usage: $0 [interface] {up|down}"
+ exit 1
+ ;;
esac
# End $network_devices/services/dhcpcd
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page