Author: jhuntwork
Date: 2005-06-26 16:00:08 -0600 (Sun, 26 Jun 2005)
New Revision: 281

Modified:
   x86/trunk/scripts/net-setup
Log:
Tweaks to net-setup script. (merged from branches/x86 r280)

Modified: x86/trunk/scripts/net-setup
===================================================================
--- x86/trunk/scripts/net-setup 2005-06-26 21:58:35 UTC (rev 280)
+++ x86/trunk/scripts/net-setup 2005-06-26 22:00:08 UTC (rev 281)
@@ -1,7 +1,8 @@
 #!/bin/bash
 #
 # Script for interactively choosing a network service
-# and starting eth0 on the LFS 6.0 bootcd.
+# and starting eth0 on the LFS LiveCD. First implemented
+# in the x86-6.0-1 CD.
 #
 # Written by Jeremy Huntwork 09.17.2004
 #
@@ -124,7 +125,7 @@
 
                # Test if dhcp worked and did not set DNS.
                # If so run set_dns function.
-               if echo `ip link show eth0 2> /dev/null` | grep -q UP ; then    
                
+               if `ip link show eth0 2>/dev/null` | grep -q UP ; then          
        
                        if [ ! -f /etc/resolv.conf ] ; then
                                echo "DHCP did not configure DNS."
                                set_dns;
@@ -162,6 +163,11 @@
 
 # Script starts here. Tests first for link on eth0
 
+if [ `whoami` != "root" ] ; then
+       echo "You must be root to use $0"
+       exit 1;
+fi
+
 if [ -n "$LINKTEST" ] ; then
 
        # If link is not up, start main function choose_service.

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to