Advertisement
s243a

try_and_connect() - /etc/rc.d/rc.network

Oct 9th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. # lines 268 to 281 of /etc/rc.d/rc.network
  2. # http://www.pearltrees.com/s243a/try-connect-network-puppylinux/id16440758
  3. # function to get ip address, via static ip or dhcp
  4. try_and_connect(){
  5.     local RETURN=1
  6.     if [ "$STATIC_IP" = "yes" ] ; then # static ip address
  7.       if setupStaticIP ; then
  8.         # need to quit, probably
  9.         RETURN=0
  10.       fi
  11.     else
  12.       setupDHCP #|| killDhcpcd "$INTERFACE" # 25feb10
  13.       RETURN=$?
  14.     fi
  15.     return $RETURN
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement