From 8b3bea69df843fa1642ef836f2cfa80e80da0f7c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 4 Jun 2010 09:39:37 +0200 Subject: [PATCH] Dropping /etc/live.conf, replaced mostly by /etc/live/config.conf of live-config. --- Makefile | 5 ---- bin/live-snapshot | 6 ++++- conf/live.conf | 7 ----- hooks/live | 8 ------ scripts/live | 7 ----- scripts/live-bottom/02etc_live_conf | 51 ------------------------------------ scripts/live-bottom/25configure_init | 2 ++ 7 files changed, 7 insertions(+), 79 deletions(-) delete mode 100644 conf/live.conf delete mode 100755 scripts/live-bottom/02etc_live_conf diff --git a/Makefile b/Makefile index 7b15560..85b8909 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,6 @@ build: install: # (FIXME) # Installing configuration - install -D -m 0644 conf/live.conf $(DESTDIR)/etc/live.conf install -D -m 0644 conf/compcache $(DESTDIR)/usr/share/initramfs-tools/conf.d/compcache # Installing executables @@ -79,10 +78,6 @@ install: done uninstall: - # (FIXME) - # Uninstalling configuration - rm -f $(DESTDIR)/etc/live.conf - # Uninstalling executables rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile rm -rf $(DESTDIR)/usr/share/live-boot diff --git a/bin/live-snapshot b/bin/live-snapshot index 1e080c3..08e5fd6 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -40,7 +40,11 @@ fi . /usr/share/initramfs-tools/scripts/live-helpers LIVE_CONF="/etc/live.conf" -. "${LIVE_CONF}" + +if [ -r "${LIVE_CONF}" ] +then + . "${LIVE_CONF}" +fi export USERNAME USERFULLNAME HOSTNAME diff --git a/conf/live.conf b/conf/live.conf deleted file mode 100644 index 93bf41d..0000000 --- a/conf/live.conf +++ /dev/null @@ -1,7 +0,0 @@ -# /etc/live.conf - configuration file for live-boot(7) - -USERNAME="user" -USERFULLNAME="Debian Live user" -HOSTNAME="debian" - -export USERNAME USERFULLNAME HOSTNAME diff --git a/hooks/live b/hooks/live index 645b168..adadab3 100755 --- a/hooks/live +++ b/hooks/live @@ -27,14 +27,6 @@ esac # Handling live-boot # Configuration -if [ -r /etc/live.conf ] -then - . /etc/live.conf - - mkdir -p "${DESTDIR}"/etc - cp /etc/live.conf "${DESTDIR}"/etc -fi - mkdir -p "${DESTDIR}"/usr/share/live-boot cp /usr/share/live-boot/languagelist "${DESTDIR}"/usr/share/live-boot diff --git a/scripts/live b/scripts/live index 5c6a82e..4eaf3a6 100755 --- a/scripts/live +++ b/scripts/live @@ -34,9 +34,6 @@ then touch /etc/mtab fi -[ -f /etc/live.conf ] && . /etc/live.conf -export USERNAME USERFULLNAME HOSTNAME - . /scripts/live-helpers if [ ! -f /live.vars ] @@ -1829,8 +1826,4 @@ mountroot () exec 2>&7 7>&- kill ${tailpid} [ -w "${rootmnt}/var/log/" ] && cp live.log "${rootmnt}/var/log/" 2>/dev/null - if [ -f /etc/live.conf ] - then - cp /etc/live.conf "${rootmnt}/etc/" - fi } diff --git a/scripts/live-bottom/02etc_live_conf b/scripts/live-bottom/02etc_live_conf deleted file mode 100755 index 8309a15..0000000 --- a/scripts/live-bottom/02etc_live_conf +++ /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-boot header - -. /scripts/live-functions - -log_begin_msg "Copying config on real root fs" - -# live-boot script - -if [ -f /etc/live.conf ] -then - if [ ! -z "${LIVECONF}" ] - then - # Updating live.conf - sed -i -e 's/\(USERNAME="\).*"/\1'"${USERNAME}"'"/g' \ - -e 's/\(USERFULLNAME="\).*"/\1'"${USERFULLNAME}"'"/g' \ - -e 's/\(HOSTNAME="\).*"/\1'"${HOSTNAME}"'"/g' \ - /etc/live.conf - fi - - cp -p /etc/live.conf /root/etc/live.conf -else - -cat > /root/etc/live.conf << EOF -export USERNAME="${USERNAME}" -export USERFULLNAME="${USERFULLNAME}" -export HOSTNAME="${HOSTNAME}" -EOF - -fi - -log_end_msg diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init index a84eb75..b82d2aa 100755 --- a/scripts/live-bottom/25configure_init +++ b/scripts/live-bottom/25configure_init @@ -28,6 +28,8 @@ log_begin_msg "Setting up init" # Arrange for shells on virtual consoles, rather than login prompts +USERNAME="user" + if [ -z "${NOAUTOLOGIN}" ] && [ -n "${USERNAME}" ] then if [ ! -z "${LIVE_GETTY}" ] -- 2.1.4