summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/18hostname
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-03-21 20:06:30 +0000
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:47:55 +0100
commitbc986e631b2dcba0f5ce7c742d498f5820028f0b (patch)
tree4a7a7da01f776b99679a877d6da4c1a08f26ef6f /scripts/live-bottom/18hostname
parent37353900b169c3f02e8163be9d3b20569ad32afe (diff)
downloadlive-boot-bc986e631b2dcba0f5ce7c742d498f5820028f0b.tar.gz
live-boot-bc986e631b2dcba0f5ce7c742d498f5820028f0b.zip
Rename 18hostname -> 06hostname
We must configure a valid hostname in the target before 10adduser, or sudo fails with "unable to resolve host (none)" - before 18hostname is called /root/etc/hostname is empty. This was resulting in the "su as sudo" modifications not being applied in the target which was causing X configuration applications to show different behaviours when attempting elevating their priviledges. Reordering the hostname configuration seems somewhat preferable to applying a hack inside 10adduser to use 'su' or similar, as other pre-XXhostname calls may incorporate calls to sudo in the future.
Diffstat (limited to 'scripts/live-bottom/18hostname')
-rwxr-xr-xscripts/live-bottom/18hostname51
1 files changed, 0 insertions, 51 deletions
diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname
deleted file mode 100755
index 446bc23..0000000
--- a/scripts/live-bottom/18hostname
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-#set -e
-
-# initramfs-tools header
-
-PREREQ=""
-
-prereqs()
-{
- echo "${PREREQ}"
-}
-
-case "${1}" in
- prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-# live-initramfs header
-
-if [ -n "${NOHOSTS}" ]
-then
- exit 0
-fi
-
-. /scripts/live-functions
-
-log_begin_msg "Setting hostname..."
-
-# live-initramfs script
-
-echo "${HOSTNAME}" > /root/etc/hostname
-
-cat >> /root/etc/hosts << EOF
-127.0.0.1 localhost
-127.0.1.1 ${HOSTNAME}
-
-# The following lines are desirable for IPv6 capable hosts
-::1 ip6-localhost ip6-loopback
-fe00::0 ip6-localnet
-ff00::0 ip6-mcastprefix
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-ff02::3 ip6-allhosts
-EOF
-
-hostname "${HOSTNAME}"
-
-log_end_msg