[Rear-users] SF.net SVN: rear:[381] trunk/usr/share/rear/rescue/GNU/Linux/ 31_network_devices.sh

dag- at users.sourceforge.net dag- at users.sourceforge.net
Fri Apr 22 11:45:37 CEST 2011


Revision: 381
          http://rear.svn.sourceforge.net/rear/?rev=381&view=rev
Author:   dag-
Date:     2011-04-22 09:45:37 +0000 (Fri, 22 Apr 2011)

Log Message:
-----------
Check if it exists, usually a symlink

Modified Paths:
--------------
    trunk/usr/share/rear/rescue/GNU/Linux/31_network_devices.sh

Modified: trunk/usr/share/rear/rescue/GNU/Linux/31_network_devices.sh
===================================================================
--- trunk/usr/share/rear/rescue/GNU/Linux/31_network_devices.sh	2011-04-22 09:10:20 UTC (rev 380)
+++ trunk/usr/share/rear/rescue/GNU/Linux/31_network_devices.sh	2011-04-22 09:45:37 UTC (rev 381)
@@ -62,10 +62,10 @@
 
 	# link is up
     # determine the driver to load, relevant only for non-udev environments
-    if [[ -z "$driver" && -f "$sysfspath/device/driver" ]]; then
+    if [[ -z "$driver" && -e "$sysfspath/device/driver" ]]; then
         # this should work for virtio_net, xennet and vmxnet on recent kernels
         driver=$(basename $(readlink $sysfspath/device/driver))
-    elif [[ -z "$driver" && -f "$sysfspath/driver" ]]; then
+    elif [[ -z "$driver" && -e "$sysfspath/driver" ]]; then
         # this should work for virtio_net, xennet and vmxnet on older kernels (2.6.18)
         driver=$(basename $(readlink $sysfspath/device/driver))
     fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list