diff --git a/packages/image/install b/packages/image/install index 9d8936cdb6..9e609950a9 100755 --- a/packages/image/install +++ b/packages/image/install @@ -81,9 +81,6 @@ case "$2" in [ "$COREBOOT" = yes ] && $SCRIPTS/install flashrom [ "$COREBOOT" = yes ] && $SCRIPTS/install getpir -# setting up hostname - echo "127.0.0.1 mobile.openelec.tv localhost" > $INSTALL/etc/hosts - # setting echo $TARGET_VERSION > $INSTALL/etc/release diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index dab893c81e..f33556830d 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -22,6 +22,7 @@ ROOT_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $ROOT_PASSWORD`" cp $PKG_DIR/config/sysconfig $INSTALL/etc touch $INSTALL/etc/fstab ln -sf /var/run/resolv.conf $INSTALL/etc/resolv.conf + ln -sf /var/run/hosts $INSTALL/etc/hosts echo $GREATING0 > $INSTALL/etc/issue echo $GREATING1 >> $INSTALL/etc/issue diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index f9d05397ec..e03b2f12c9 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -3,6 +3,8 @@ # read config . /etc/sysconfig +HOSTNAME="openelec" + # mounting needed filesystems /bin/mount -n -t ramfs none /var @@ -14,6 +16,12 @@ install -m 1777 -d /var/tmp install -m 755 -d /var/run/sepermit # for LinuxPAM +# bring lo up, whether we have network card or not + ifconfig lo 127.0.0.1 up + +# create /etc/hosts file, useful for gethostbyname(localhost) + echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts + # starting Xorg [ ! "$TEXTMODE" = "yes" ] && start_xorg