summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-02-26 11:58:48 +0000
committerRod Whitby <rod@whitby.id.au>2005-02-26 11:58:48 +0000
commit7c65ec8729b8f74dade28b2422cb03b73e5ae2eb (patch)
treebce2f92afe1e81c55ab244e1e0736aa18cd56e3f /packages
parentda397f69c4f696ed5640bfce59108b592ebe8395 (diff)
Added hostname and dns server support to openslug sysconfsetup
BKrev: 42206478aR6xQ_4e27X_b_GO_natVQ
Diffstat (limited to 'packages')
-rw-r--r--packages/openslug-init/openslug-init-0.10/sysconfsetup42
-rw-r--r--packages/openslug-init/openslug-init_0.10.bb2
2 files changed, 26 insertions, 18 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/sysconfsetup b/packages/openslug-init/openslug-init-0.10/sysconfsetup
index 3165db907d..5c9723bb03 100644
--- a/packages/openslug-init/openslug-init-0.10/sysconfsetup
+++ b/packages/openslug-init/openslug-init-0.10/sysconfsetup
@@ -19,34 +19,42 @@ auto eth0
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 hw_addr >> /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/hw_addr=/ hwaddress ether /' /etc/interfaces
sed -i -e 's/gateway=/ gateway /' /etc/interfaces
+ sed -i -e 's/hw_addr=/ hwaddress ether /' /etc/interfaces
mv /etc/network/interfaces /etc/network/interfaces.old
cp /etc/interfaces /etc/network/interfaces
-# mv /etc/interfaces /etc/network/interfaces
- echo "Configured /etc/network/interfaces with IP Static linksysconf Information"
-fi
-# Module loading handled more properly by update-modules and modprobe.conf
+ echo "Configured /etc/network/interfaces from /etc/linksysconf"
-exit 0
+ strings /etc/linksysconf | grep disk_server_name >> /tmp/hostname
+ sed -i -e 's/disk_server_name=//' /tmp/hostname
-# Future stuff ....
+ if [ -s /tmp/hostname ] ; then
+ mv /etc/hostname /etc/hostname.old
+ mv /tmp/hostname /etc/hostname
+ echo "Configured /etc/hostname from /etc/linksysconf"
+ fi
-# Use the bootproto key to set "static" or "dhcp", then do other stuff based on that.
- strings /etc/linksysconf | grep bootproto >> /etc/interfaces
- strings /etc/linksysconf | grep disk_server_name >> /etc/interfaces
- strings /etc/linksysconf | grep hw_addr >> /etc/interfaces
- strings /etc/linksysconf | grep dns_server1 >> /etc/interfaces
- sed -i -e 's/bootproto=//' /etc/interfaces
- sed -i -e 's/disk_server_name=/ hostname /' /etc/interfaces
- sed -i -e 's/hw_addr=/ hwaddress ether /' /etc/interfaces
- sed -i -e 's/dns_server1=/ /' /etc/interfaces
+ strings /etc/linksysconf | grep dns_server1 >> /tmp/resolv.conf
+ sed -i -e 's/dns_server1=/nameserver /' /tmp/resolv.conf
+
+ if [ -s /tmp/resolv.conf ] ; then
+ mv /etc/resolv.conf /etc/resolv.conf.old
+ mv /tmp/resolv.conf /etc/resolv.conf
+ echo "Configured /etc/resolv.conf from /etc/linksysconf"
+ fi
+fi
+
+# Module loading handled more properly by update-modules and modprobe.conf
diff --git a/packages/openslug-init/openslug-init_0.10.bb b/packages/openslug-init/openslug-init_0.10.bb
index 6b076c7eee..5c7a8e8460 100644
--- a/packages/openslug-init/openslug-init_0.10.bb
+++ b/packages/openslug-init/openslug-init_0.10.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Openslug initial network config via sysconf"
SECTION = "console/network"
LICENSE = "GPL"
DEPENDS = "base-files"
-PR = "r10"
+PR = "r11"
OPENSLUG_VERSION = "1.3-alpha"