Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
sysconfig
> sysconfig_ifup-dhcp-status_infinite_leasetime.192745.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File sysconfig_ifup-dhcp-status_infinite_leasetime.192745.patch of Package sysconfig (Revision 1)
Currently displaying revision
1
,
show latest
--- scripts/ifup-dhcp 2006-06-02 11:51:54.000000000 +0000 +++ scripts/ifup-dhcp 2006-12-10 11:19:42.000000000 +0000 @@ -495,7 +495,17 @@ message "`printf " %-9s is just beeing set up" $INTERFACE`" exit $R_DHCP_BG else - message "`printf " %-9s DHCP client NOT running" $INTERFACE`" + # dhcpcd may not be running (it quits if it gets an infinite lease) + info=/var/lib/dhcpcd/dhcpcd-$INTERFACE.info + if test -s $info && grep -q LEASETIME=4294967295 $info; then + EXTRA_INFO=", because it got an infinite lease" + RET_VAL=$R_SUCCESS + else + EXTRA_INFO= + RET_VAL=$R_NOTRUNNING + fi + message "`printf " %-9s DHCP client NOT running%s" \ + "$INTERFACE" "$EXTRA_INFO"`" if [ "$RUN_FROM_RC" = yes ] ; then while read a b c d e f g h i; do message "`printf " %-9s IP address: %s (DHCP)" ${i:-$b} $d`" @@ -503,7 +513,7 @@ else message "$(ip addr show $INTERFACE)" fi - exit $R_NOTRUNNING + exit $RET_VAL fi