From 84ba822f079e2d6a316196ed2bf41abe15a37c3a Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 26 Mar 2010 11:08:55 +0100 Subject: [PATCH] busybox: - cleanup - create /etc/hosts at install time --- packages/sysutils/busybox/init.d/08_network | 7 ------- packages/sysutils/busybox/install | 14 +++++++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/sysutils/busybox/init.d/08_network b/packages/sysutils/busybox/init.d/08_network index 58e7be486d..17c3e06c9f 100755 --- a/packages/sysutils/busybox/init.d/08_network +++ b/packages/sysutils/busybox/init.d/08_network @@ -3,10 +3,6 @@ # # runlevels: openelec, textmode -HOSTNAME=`cat /etc/hostname` - -export $HOSTNAME - # bring lo up, whether we have network card or not progress "starting Loopback Network interface" ifconfig lo 127.0.0.1 up @@ -14,6 +10,3 @@ export $HOSTNAME # setup hostname progress "Setup hostname" echo $HOSTNAME > /proc/sys/kernel/hostname - -# create /etc/hosts file, useful for gethostbyname(localhost) - echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index 5999cc6866..aa527b7ccd 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -22,14 +22,21 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $USER_PASSWORD`" mkdir -p $INSTALL/bin ln -sf /bin/sh $INSTALL/bin/bash + mkdir -p $INSTALL/sbin + cp $PKG_DIR/scripts/init $INSTALL/sbin/ + mkdir -p $INSTALL/etc cp $PKG_DIR/config/profile $INSTALL/etc touch $INSTALL/etc/fstab ln -sf /var/run/resolv.conf $INSTALL/etc/resolv.conf - ln -sf /var/run/hosts $INSTALL/etc/hosts +# create /etc/hostname echo $HOSTNAME > $INSTALL/etc/hostname +# create /etc/hosts file, useful for gethostbyname(localhost) + echo -e "127.0.0.1\tlocalhost $HOSTNAME" > $INSTALL/etc/hosts + +# create /etc/issue echo $GREATING0 > $INSTALL/etc/issue echo $GREATING1 >> $INSTALL/etc/issue echo $GREATING2 >> $INSTALL/etc/issue @@ -39,10 +46,7 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $USER_PASSWORD`" mkdir -p $INSTALL/usr/share/udhcpc cp $PKG_DIR/scripts/udhcp.script $INSTALL/usr/share/udhcpc/default.script - mkdir -p $INSTALL/sbin - cp $PKG_DIR/scripts/init $INSTALL/sbin/ - - # acpid specific +# acpid specific mkdir -p $INSTALL/etc/acpi/PWRF cp $PKG_DIR/scripts/acpi_powerbtn $INSTALL/etc/acpi/PWRF/00000080