Changed the name of the original network settings file in OpenSlug
authorRod Whitby <rod@whitby.id.au>
Sat, 26 Feb 2005 15:03:06 +0000 (15:03 +0000)
committerRod Whitby <rod@whitby.id.au>
Sat, 26 Feb 2005 15:03:06 +0000 (15:03 +0000)
BKrev: 42208faahaOnMmzqEVOTPndGl3oiwg

packages/openslug-init/openslug-init-0.10/sysconfsetup

index 5c9723b..d52f6e1 100644 (file)
@@ -8,7 +8,7 @@ then
    /usr/sbin/update-modules
 
    dd if=/dev/mtdblock1 of=/etc/linksysconf
-   cat <<EOF > /etc/interfaces
+   cat <<EOF > /etc/original-network-settings
 # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
 
 # The loopback interface
@@ -20,20 +20,20 @@ iface eth0 inet static
 EOF
 
    # Use the bootproto key to set "static" or "dhcp", then do other stuff based on that.
-   # strings /etc/linksysconf | grep bootproto >> /etc/interfaces
-   # sed -i -e 's/bootproto=//' /etc/interfaces
-
-   strings /etc/linksysconf | grep ip_addr >> /etc/interfaces
-   strings /etc/linksysconf | grep ^netmask >> /etc/interfaces
-   strings /etc/linksysconf | grep gateway >> /etc/interfaces
-   strings /etc/linksysconf | grep hw_addr >> /etc/interfaces
-   sed -i -e 's/ip_addr=/        address /' /etc/interfaces
-   sed -i -e 's/netmask=/        netmask /' /etc/interfaces
-   sed -i -e 's/gateway=/        gateway /' /etc/interfaces
-   sed -i -e 's/hw_addr=/        hwaddress ether /' /etc/interfaces
+   # strings /etc/linksysconf | grep bootproto >> /etc/original-network-settings
+   # sed -i -e 's/bootproto=//' /etc/original-network-settings
+
+   strings /etc/linksysconf | grep ip_addr >> /etc/original-network-settings
+   strings /etc/linksysconf | grep ^netmask >> /etc/original-network-settings
+   strings /etc/linksysconf | grep gateway >> /etc/original-network-settings
+   strings /etc/linksysconf | grep hw_addr >> /etc/original-network-settings
+   sed -i -e 's/ip_addr=/        address /' /etc/original-network-settings
+   sed -i -e 's/netmask=/        netmask /' /etc/original-network-settings
+   sed -i -e 's/gateway=/        gateway /' /etc/original-network-settings
+   sed -i -e 's/hw_addr=/        hwaddress ether /' /etc/original-network-settings
 
    mv /etc/network/interfaces /etc/network/interfaces.old
-   cp /etc/interfaces /etc/network/interfaces
+   cp /etc/original-network-settings /etc/network/interfaces
 
    echo "Configured /etc/network/interfaces from /etc/linksysconf"