]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/cdrom/roottree/etc/start_network.sh
Update
[bacula/rescue] / rescue / linux / cdrom / roottree / etc / start_network.sh
index 65a22fe30cc0c25f7e931d50cb245f1c559e09f8..9df7ab356e54779b80773d3cc280fca765b22a51 100755 (executable)
@@ -7,16 +7,18 @@
 #  dhcpcd below to dhclient if you are running RedHat
 #
 
-if ifconfig eth0 >/dev/null 2>&1 ; then
+DHCPCD=/bin/dhcpcd
+if [ ! -x $DHCPCD ] ; then
+   DHCPCD=/bin/dhclient
+fi
 
+if ifconfig eth0 >/dev/null 2>&1 ; then
     echo "Setting up network..."
-    /bin/dhcpcd $eth0
-
+    $DHCPCD eth0
     echo "done"
 
     ifconfig
     exit
-
 fi
 
 echo "No network card present, cannot configure network"