examples/var_service: use "exec sleep 5" instead of "{ sleep 5; exit; }"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		@@ -8,7 +8,7 @@ pwd="$PWD"
 | 
			
		||||
if="${PWD##*/dhcp_}"
 | 
			
		||||
 | 
			
		||||
echo "* Upping iface $if"
 | 
			
		||||
ip link set dev "$if" up || { sleep 5; exit; }
 | 
			
		||||
ip link set dev "$if" up || exec sleep 5
 | 
			
		||||
 | 
			
		||||
echo "* Starting udhcpc on $if [$$]"
 | 
			
		||||
exec \
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ pwd="$PWD"
 | 
			
		||||
if="${PWD##*/dhcpd_}"
 | 
			
		||||
 | 
			
		||||
echo "* Upping iface $if"
 | 
			
		||||
ip link set dev $if up || { sleep 5; exit; }
 | 
			
		||||
ip link set dev $if up || exec sleep 5
 | 
			
		||||
 | 
			
		||||
>>udhcpd.leases
 | 
			
		||||
sed 's/^interface.*$/interface '"$if/" -i udhcpd.conf
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ pwd="$PWD"
 | 
			
		||||
if="${PWD##*/ifplugd_}"
 | 
			
		||||
 | 
			
		||||
echo "* Upping iface $if"
 | 
			
		||||
ip link set dev "$if" up || { sleep 5; exit; }
 | 
			
		||||
ip link set dev "$if" up || exec sleep 5
 | 
			
		||||
 | 
			
		||||
echo "* Starting ifplugd on $if [$$]"
 | 
			
		||||
exec \
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ if="${PWD##*/dhcp_}"
 | 
			
		||||
 | 
			
		||||
echo "* Upping iface $if"
 | 
			
		||||
# "or sleep" idiom prevents rapid respawning if iface does not exist
 | 
			
		||||
ip link set dev "$if" up || { sleep 5; exit; }
 | 
			
		||||
ip link set dev "$if" up || exec sleep 5
 | 
			
		||||
 | 
			
		||||
##echo "* Powersave disable on $if"
 | 
			
		||||
##iw dev "$if" set power_save off
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ pwd="$PWD"
 | 
			
		||||
if="${PWD##*/zcip_}"
 | 
			
		||||
 | 
			
		||||
echo "* Upping iface $if"
 | 
			
		||||
ip link set dev "$if" up || { sleep 5; exit; }
 | 
			
		||||
ip link set dev "$if" up || exec sleep 5
 | 
			
		||||
 | 
			
		||||
echo "* Starting zcip on $if [$$]"
 | 
			
		||||
exec \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user