[SCM] live-config branch, upstream, updated. upstream/3.0_a39-1-gd518adf
Daniel Baumann
daniel at debian.org
Fri Jun 22 12:13:21 UTC 2012
The following commit has been merged in the upstream branch:
commit d518adf7012fb45094f73271b196fc6264756f71
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Jun 14 08:01:32 2012 +0200
Adding upstream version 3.0~a40.
diff --git a/Makefile b/Makefile
index ae3d0c9..0e1fd75 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,9 @@ build:
install:
# Installing backends
+ mkdir -p $(DESTDIR)/lib/live
+ cp -a backends/debconf $(DESTDIR)/lib/live/debconfig
+
mkdir -p $(DESTDIR)/etc/init.d
cp backends/sysvinit/live-config.init $(DESTDIR)/etc/init.d/live-config
cp backends/sysvinit/live.init $(DESTDIR)/etc/init.d/live
@@ -68,6 +71,9 @@ install:
cp bin/boot-init.sh $(DESTDIR)/lib/live
+ mkdir -p $(DESTDIR)/sbin
+ cp bin/live-debconfig $(DESTDIR)/sbin
+
# Installing docs
mkdir -p $(DESTDIR)/usr/share/doc/live-config
cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-config
diff --git a/VERSION b/VERSION
index 1e477bf..980c060 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0~a39-1
+3.0~a40-1
diff --git a/backends/debconf/001-hostname b/backends/debconf/001-hostname
new file mode 100755
index 0000000..5364b1a
--- /dev/null
+++ b/backends/debconf/001-hostname
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+Defaults ()
+{
+ if [ -z "${_HOSTNAME}" ]
+ then
+ if [ -n "$(cat /etc/hostname 2> /dev/null)" ]
+ then
+ _HOSTNAME="$(cat /etc/hostname)"
+ elif [ -x /usr/bin/lsb_release ]
+ then
+ _HOSTNAME="$(lsb_release -is | tr [A-Z] [a-z])"
+ elif [ -e /etc/progress_version ]
+ then
+ _HOSTNAME="progress"
+ else
+ _HOSTNAME="debian"
+ fi
+ fi
+}
+
+db_get live-debconfig/hostname/hostname
+_HOSTNAME="${RET}" # string (w/o empty)
+
+Defaults
+
+db_set live-debconfig/hostname/hostname "${_HOSTNAME}"
+db_fset live-debconfig/hostname/hostname seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/hostname/hostname || true
+db_go
+
+db_get live-debconfig/hostname/hostname
+_HOSTNAME="${RET}" # string (w/o empty)
+
+Defaults
+
+db_stop
+
+# Set the hostname
+echo "${_HOSTNAME}" > /etc/hostname
diff --git a/backends/debconf/001-hostname.templates b/backends/debconf/001-hostname.templates
new file mode 100644
index 0000000..359572f
--- /dev/null
+++ b/backends/debconf/001-hostname.templates
@@ -0,0 +1,12 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/hostname/hostname
+Type: string
+Default: debian
+Description: live-debconfig: Hostname?
+ What should be the hostname of the current system?
+ .
+ This defaults to either /etc/hostname (if present), is automatically guessed
+ through lsb_release (if present), or otherwise set to 'debian'.
diff --git a/backends/debconf/002-ifupdown b/backends/debconf/002-ifupdown
new file mode 100755
index 0000000..bc3d129
--- /dev/null
+++ b/backends/debconf/002-ifupdown
@@ -0,0 +1,241 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+Defaults ()
+{
+ _ETH0_METHOD="${_ETH0_METHOD:-dhcp}"
+ _ETH0_ADDRESS="${_ETH0_ADDRESS:-192.168.1.2}"
+ _ETH0_BROADCAST="${_ETH0_BROADCAST:-192.168.1.0}"
+ _ETH0_GATEWAY="${_ETH0_GATEWAY:-192.168.1.1}"
+ _ETH0_NETMASK="${_ETH0_NETMASK:-255.255.255.0}"
+ _ETH0_NETWORK="${_ETH0_NETWORK:-192.168.1.255}"
+ _ETH0_NAMESERVERS="${_ETH0_NAMESERVERS:-192.168.1.1}"
+}
+
+#db_get live-debconfig/ifupdown/eth0-method
+#_ETH0_METHOD="${RET}" # select
+
+Defaults
+
+db_set live-debconfig/ifupdown/eth0-method "${_ETH0_METHOD}"
+db_fset live-debconfig/ifupdown/eth0-method seen false
+
+db_set live-debconfig/ifupdown/eth0-address "${_ETH0_ADDRESS}"
+db_fset live-debconfig/ifupdown/eth0-address seen false
+
+db_set live-debconfig/ifupdown/eth0-broadcast "${_ETH0_BROADCAST}"
+db_fset live-debconfig/ifupdown/eth0-broadcast seen false
+
+db_set live-debconfig/ifupdown/eth0-gateway "${_ETH0_GATEWAY}"
+db_fset live-debconfig/ifupdown/eth0-gateway seen false
+
+db_set live-debconfig/ifupdown/eth0-netmask "${_ETH0_NETMASK}"
+db_fset live-debconfig/ifupdown/eth0-netmask seen false
+
+db_set live-debconfig/ifupdown/eth0-network "${_ETH0_NETWORK}"
+db_fset live-debconfig/ifupdown/eth0-network seen false
+
+db_set live-debconfig/ifupdown/nameservers "${_NAMESERVERS}"
+db_fset live-debconfig/ifupdown/nameservers seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/ifupdown/eth0-method || true
+db_go
+
+db_get live-debconfig/ifupdown/eth0-method
+_ETH0_METHOD="${RET}" # select
+
+case "${_ETH0_METHOD}" in
+ none)
+ db_stop
+
+ exit
+ ;;
+
+ dhcp)
+
+ ;;
+
+ static)
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/eth0-address || true
+ db_go
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/eth0-broadcast || true
+ db_go
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/eth0-gateway || true
+ db_go
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/eth0-netmask || true
+ db_go
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/eth0-network || true
+ db_go
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/ifupdown/nameservers || true
+ db_go
+ ;;
+esac
+
+_NUMBER="0"
+
+while db_get live-debconfig/ifupdown/eth${_NUMBER}-method && [ "${RET}" ]
+do
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-comment
+ then
+ eval _ETH${_NUMBER}_COMMENT="\"${RET}\"" # string (w/ empty)
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-method
+ then
+ eval _ETH${_NUMBER}_METHOD="\"${RET}\"" # select
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-address
+ then
+ eval _ETH${_NUMBER}_ADDRESS="\"${RET}\"" # string (w/o empty)
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-broadcast
+ then
+ eval _ETH${_NUMBER}_BROADCAST="\"${RET}\"" # string (w/ empty)
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-gateway
+ then
+ eval _ETH${_NUMBER}_GATEWAY="\"${RET}\"" # string (w/ empty)
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-netmask
+ then
+ eval _ETH${_NUMBER}_NETMASK="\"${RET}\"" # string (w/ empty)
+ fi
+
+ if db_get live-debconfig/ifupdown/eth${_NUMBER}-network
+ then
+ eval _ETH${_NUMBER}_NETWORK="\"${RET}\"" # string (w/ empty)
+ fi
+
+ _NUMBER="$((${_NUMBER} + 1))"
+done
+
+_ETH_NUMBER="${_NUMBER}"
+
+db_get live-debconfig/ifupdown/nameservers
+_NAMESERVERS="${RET}" # string (w/ empty)
+
+Defaults
+
+db_stop
+
+# Create /etc/network/interfaces
+
+cat > /etc/network/interfaces << EOF
+# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
+# /usr/share/doc/ifupdown/examples for more information.
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+EOF
+
+for _NUMBER in $(seq 0 ${_ETH_NUMBER})
+do
+ eval _COMMENT="$`echo _ETH${_NUMBER}_COMMENT`"
+ eval _METHOD="$`echo _ETH${_NUMBER}_METHOD`"
+ eval _ADDRESS="$`echo _ETH${_NUMBER}_ADDRESS`"
+ eval _BROADCAST="$`echo _ETH${_NUMBER}_BROADCAST`"
+ eval _GATEWAY="$`echo _ETH${_NUMBER}_GATEWAY`"
+ eval _NETMASK="$`echo _ETH${_NUMBER}_NETMASK`"
+ eval _NETWORK="$`echo _ETH${_NUMBER}_NETWORK`"
+
+ if [ -z "${_METHOD}" ]
+ then
+ continue
+ fi
+
+ echo >> /etc/network/interfaces
+
+ if [ -n "${_COMMENT}" ]
+ then
+ echo "# ${_COMMENT}" >> /etc/network/interfaces
+ fi
+
+ case "${_METHOD}" in
+ dhcp)
+
+cat >> /etc/network/interfaces << EOF
+auto eth${_NUMBER}
+iface eth${_NUMBER} inet dhcp
+EOF
+
+ ;;
+
+ static)
+
+cat >> /etc/network/interfaces << EOF
+auto eth${_NUMBER}
+iface eth${_NUMBER} inet static
+ address ${_ADDRESS}
+EOF
+
+ if [ -n "${_BROADCAST}" ]
+ then
+ echo " broadcast ${_BROADCAST}" >> /etc/network/interfaces
+ fi
+
+ if [ -n "${_GATEWAY}" ]
+ then
+ echo " gateway ${_GATEWAY}" >> /etc/network/interfaces
+ fi
+
+ echo " netmask ${_NETMASK}" >> /etc/network/interfaces
+
+ if [ -n "${_NETWORK}" ]
+ then
+ echo " network ${_NETWORK}" >> /etc/network/interfaces
+ fi
+ ;;
+ esac
+
+ _NUMBER="$((${_NUMBER} + 1))"
+done
+
+# Create /etc/resolv.conf
+if [ -n "${_NAMESERVERS}" ]
+then
+ rm -f /etc/resolv.conf
+
+ for _NAMESERVER in $(echo ${_NAMESERVERS} | sed -e 's|,| |g')
+ do
+ echo "nameserver ${_NAMESERVER}" >> /etc/resolv.conf
+ done
+fi
+
+# Create /etc/hosts
+case "${_ETH0_METHOD}" in
+ static)
+
+cat > /etc/hosts << EOF
+127.0.0.1 localhost
+${_ETH0_ADDRESS} $(cat /etc/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
+EOF
+
+ ;;
+esac
diff --git a/backends/debconf/002-ifupdown.templates b/backends/debconf/002-ifupdown.templates
new file mode 100644
index 0000000..21f39ce
--- /dev/null
+++ b/backends/debconf/002-ifupdown.templates
@@ -0,0 +1,61 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/ifupdown/eth0-method
+Type: select
+Choices: dhcp, static, none
+Default: dhcp
+Description: live-debconfig: Interface Method?
+ What method should be used to configure the interface?
+ .
+ This defaults to dhcp and will require that you run a dhcp-server in your network.
+
+Template: live-debconfig/ifupdown/eth0-address
+Type: string
+Default: 192.168.1.2
+Description: live-debconfig: IP Address?
+ What should be the IP address of the current system?
+ .
+ This defaults to 192.168.1.2.
+
+Template: live-debconfig/ifupdown/eth0-broadcast
+Type: string
+Default: 192.168.1.255
+Description: live-debconfig: Broadcast Address?
+ What should be the broadcast address of the current system?
+ .
+ This defaults to 192.168.1.255 but can be left empty.
+
+Template: live-debconfig/ifupdown/eth0-gateway
+Type: string
+Default: 192.168.1.1
+Description: live-debconfig: Gateway Address?
+ What should be the gateway address of the current system?
+ .
+ This defaults to 192.168.1.1 but can be left empty.
+
+Template: live-debconfig/ifupdown/eth0-netmask
+Type: string
+Default: 255.255.255.0
+Description: live-debconfig: Network Mask?
+ What should be the netmask of the current system?
+ .
+ This defaults to 255.255.255.0.
+
+Template: live-debconfig/ifupdown/eth0-network
+Type: string
+Default: 192.168.1.0
+Description: live-debconfig: Network Address?
+ What should be the network address of the current system?
+ .
+ This defaults to 192.168.1.0 but can be left empty.
+
+Template: live-debconfig/ifupdown/nameservers
+Type: string
+Default: 192.168.1.1
+Description: live-debconfig: Nameserver Addresses?
+ What should be the IP addresses of the nameservers of the current system?
+ .
+ This defaults to 192.168.1.1 but can be left empty.
+ Multiple nameservers can be separated by whitespace.
diff --git a/backends/debconf/003-openssh-server b/backends/debconf/003-openssh-server
new file mode 100755
index 0000000..fcd54dc
--- /dev/null
+++ b/backends/debconf/003-openssh-server
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Recreating openssh-server host keys
+for _PROTOCOL in dsa rsa ecdsa
+do
+ if [ ! -e /etc/ssh/ssh_host_${_PROTOCOL}_key ] && \
+ grep -qs "ssh_host_${_PROTOCOL}_key" /etc/ssh/sshd_config
+ then
+ if [ -x /usr/bin/ssh-keygen ]
+ then
+ echo -n "P: Creating files /etc/ssh/ssh_host_${_PROTOCOL}_key /etc/ssh/ssh_host_${_PROTOCOL}_key.pub..."
+
+ ssh-keygen -q -f /etc/ssh/ssh_host_${_PROTOCOL}_key -N "" -t ${_PROTOCOL}
+ fi
+ fi
+done
diff --git a/backends/debconf/003-openssh-server.templates b/backends/debconf/003-openssh-server.templates
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/backends/debconf/003-openssh-server.templates
@@ -0,0 +1 @@
+
diff --git a/backends/debconf/004-selinux b/backends/debconf/004-selinux
new file mode 100755
index 0000000..840e7ca
--- /dev/null
+++ b/backends/debconf/004-selinux
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+Defaults ()
+{
+ if [ -z "${_ENABLE}" ]
+ then
+ if [ -n "$(cat /selinux/enforce 2> /dev/null)" ]
+ then
+ case "$(cat /selinux/enforce 2> /dev/null)" in
+ 0)
+ _ENABLE="false"
+ ;;
+
+ 1)
+ _ENABLE="true"
+ ;;
+ esac
+ else
+ _ENABLE="false"
+ fi
+ fi
+}
+
+#db_get live-debconfig/selinux/enable
+#_ENABLE="${RET}" # boolean
+
+Defaults
+
+db_set live-debconfig/selinux/enable "${_ENABLE}"
+db_fset live-debconfig/selinux/enable seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/selinux/enable || true
+db_go
+
+db_get live-debconfig/selinux/enable
+_ENABLE="${RET}" # boolean
+
+#Defaults
+
+db_stop
+
+case "${_ENABLE}" in
+ true)
+ rm -f /selinux/enforce
+ rmdir --ignore-fail-on-non-empty /selinux > /dev/null 2>&1 || true
+ ;;
+
+ false)
+ mkdir -p /selinux
+ echo 0 > /selinux/enforce
+ ;;
+esac
diff --git a/backends/debconf/004-selinux.templates b/backends/debconf/004-selinux.templates
new file mode 100644
index 0000000..8c7363c
--- /dev/null
+++ b/backends/debconf/004-selinux.templates
@@ -0,0 +1,11 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/selinux/enable
+Type: boolean
+Default: false
+Description: live-debconfig: Enable SELinux?
+ Should Security-Enhanced Linux (SELinux) be enabled?
+ .
+ This defaults to false.
diff --git a/backends/debconf/005-sysvinit b/backends/debconf/005-sysvinit
new file mode 100755
index 0000000..eff22c0
--- /dev/null
+++ b/backends/debconf/005-sysvinit
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+Defaults ()
+{
+ _LXC_ENABLE="${_LXC_ENABLE:-false}"
+ _LXC_CONSOLES="${_LXC_CONSOLES:-6}"
+}
+
+#db_get live-debconfig/sysvinit/lxc-enable
+#_LXC_ENABLE="${RET}" # boolean
+
+Defaults
+
+db_set live-debconfig/sysvinit/lxc-enable "${_LXC_ENABLE}"
+db_fset live-debconfig/sysvinit/lxc-enable seen false
+
+db_set live-debconfig/sysvinit/lxc-consoles "${_LXC_CONSOLES}"
+db_fset live-debconfig/sysvinit/lxc-consoles seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/sysvinit/lxc-enable || true
+db_go
+
+db_get live-debconfig/sysvinit/lxc-enable
+_LXC_ENABLE="${RET}" # boolean
+
+case "${_LXC_ENABLE}" in
+ true)
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/sysvinit/lxc-consoles || true
+ db_go
+
+ db_get live-debconfig/sysvinit/lxc-consoles
+ _LXC_CONSOLES="${RET}" # string (w/o empty)
+
+ Defaults
+ ;;
+
+ false)
+
+ ;;
+esac
+
+db_stop
+
+case "${_LXC_ENABLE}" in
+ true)
+ # Updating file /etc/inittab..."
+
+ # Disable sulogin
+ # ~~:S:wait:/sbin/sulogin
+ sed -i -e 's|\(^[^#].*S:wait:.*$\)|#\1|' /etc/inittab
+
+ # Disable ctrlaltdel
+ # ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
+ sed -i -e 's|\(^[^#].*:ctrlaltdel:.*$\)|#\1|' /etc/inittab
+
+ # Disable power
+ # pf::powerwait:/etc/init.d/powerfail start
+ # pn::powerfailnow:/etc/init.d/powerfail now
+ # po::powerokwait:/etc/init.d/powerfail stop
+ sed -i -e 's|\(^[^#].*:power.*:.*$\)|#\1|' /etc/inittab
+
+ # Disable normal getty
+ # 1:2345:respawn:/sbin/getty 38400 tty1
+ # 2:23:respawn:/sbin/getty 38400 tty2
+ # 3:23:respawn:/sbin/getty 38400 tty3
+ # ...
+ # Keep container getty
+ # 1:2345:respawn:/sbin/getty 38400 console
+ # c1:23:respawn:/sbin/getty 38400 tty1
+ # c2:23:respawn:/sbin/getty 38400 tty2
+ # ...
+ sed -i -e 's|\(^[^#,^c].*:respawn:/sbin/getty.*[^console,linux]$\)|#\1|' /etc/inittab
+
+ # Enable container getty
+ # 1:2345:respawn:/sbin/getty 38400 console
+ # c1:23:respawn:/sbin/getty 38400 tty1
+ # c2:23:respawn:/sbin/getty 38400 tty2
+
+ # Assemble new entries
+ _CONSOLES="\n#-- live-debconfig begin\n1:2345:respawn:/sbin/getty 38400 console"
+
+ for _CONSOLE in $(seq 1 ${_LXC_CONSOLES})
+ do
+ _CONSOLES="${_CONSOLES}\nc${_CONSOLE}:12345:respawn:/sbin/getty 38400 tty${_CONSOLE} linux"
+ done
+
+ _CONSOLES="${_CONSOLES}\n#-- live-debconfig end"
+
+ # Remove old entries
+ sed -e '/#-- live-debconfig begin/,/#-- live-debconfig end/d' /etc/inittab > /etc/inittab.tmp
+ mv -f /etc/inittab.tmp /etc/inittab
+
+ # Add new entries
+ _CONSOLE="$(grep '#[0-9].*:respawn:/sbin/getty' /etc/inittab | tail -1)"
+
+ sed -e "s|\(${_CONSOLE}\)|\1${_CONSOLES}|" /etc/inittab > /etc/inittab.tmp
+ mv -f /etc/inittab.tmp /etc/inittab
+
+ # squeeze and newer only has /dev/tty and /dev/tty0 by default,
+ # therefore creating missing device nodes for tty1-4.
+ for _CONSOLE in $(seq 1 ${_LXC_CONSOLES})
+ do
+ if [ ! -e "/dev/tty${_CONSOLE}" ]
+ then
+ mknod "/dev/tty${_CONSOLE}" c 4 "${_CONSOLE}"
+ fi
+ done
+
+ # Remove pointless services in a container
+ for _SERVICE in checkroot.sh hwclockfirst.sh hwclock.sh module-init-tools umountfs umountroot
+ do
+ if [ -e "/etc/init.d/${_SERVICE}" ]
+ then
+ update-rc.d -f ${_SERVICE} disable | \
+ grep -v "update-rc.d: using dependency based boot sequencing" || true
+ fi
+ done
+ ;;
+
+ false)
+ # Revert /etc/inittab
+ cp -p /usr/share/sysvinit/inittab /etc/inittab
+
+ # Renable services
+ for _SERVICE in checkroot.sh hwclockfirst.sh hwclock.sh module-init-tools umountfs umountroot
+ do
+ if [ -e "/etc/init.d/${_SERVICE}" ]
+ then
+ update-rc.d -f ${_SERVICE} defaults | \
+ grep -v "update-rc.d: using dependency based boot sequencing" || true
+ fi
+ done
+ ;;
+esac
diff --git a/backends/debconf/005-sysvinit.templates b/backends/debconf/005-sysvinit.templates
new file mode 100644
index 0000000..3f42141
--- /dev/null
+++ b/backends/debconf/005-sysvinit.templates
@@ -0,0 +1,19 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/sysvinit/lxc-enable
+Type: boolean
+Default: false
+Description: live-debconfig: Enable LXC?
+ Should Linux Container (LXC) support be enabled?
+ .
+ This defaults to false.
+
+Template: live-debconfig/sysvinit/lxc-consoles
+Type: string
+Default: 6
+Description: live-debconfig: How many consoles for LXC?
+ How many concurrent consoles should the current container provide?
+ .
+ This defaults to 6 and will result in six getty processes per container.
diff --git a/backends/sysvinit/live.init b/backends/sysvinit/live.init
index 55e3076..2ced748 100755
--- a/backends/sysvinit/live.init
+++ b/backends/sysvinit/live.init
@@ -7,7 +7,7 @@
### BEGIN INIT INFO
-# Provides: live-boot
+# Provides: live
# Required-Start: $syslog bootmisc
# Required-Stop:
# Should-Start: $local_fs
diff --git a/bin/boot-init.sh b/bin/boot-init.sh
index aee1eb6..1174306 100755
--- a/bin/boot-init.sh
+++ b/bin/boot-init.sh
@@ -1,11 +1,28 @@
#!/bin/sh
-# Exit if system was not booted by live-boot
-grep -qs boot=live /proc/cmdline || exit 0
+## live-config(7) - System Configuration Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel at debian.org>
+##
+## live-config comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+# Exit if system is not a live system
+if grep -qs "boot=live" /proc/cmdline || \
+# Exit if system is netboot
+ grep -qs "netboot" /proc/cmdline || \
+ grep -qs "root=/dev/nfs" /proc/cmdline || \
+ grep -qs "root=/dev/cifs" /proc/cmdline || \
+# Exit if system is toram
+ grep -qs "toram" /proc/cmdline
+then
+ exit 0
+fi
+
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
# Try to cache everything we're likely to need after ejecting. This
# is fragile and simple-minded, but our options are limited.
@@ -126,18 +143,6 @@ Eject ()
fi
}
-# check for netboot
-if [ ! -z "${NETBOOT}" ] || grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline || grep -qsi root=/dev/cifs /proc/cmdline
-then
- return 0
-fi
-
-# check for toram
-if grep -qs toram /proc/cmdline
-then
- return 0
-fi
-
# Don't prompt to eject the SD card on Babbage board, where we reuse it
# as a quasi-boot-floppy. Technically this uses a bit of ubiquity
# (archdetect), but since this is mostly only relevant for
@@ -153,7 +158,7 @@ then
esac
fi
-log_begin_msg "live-boot: caching reboot files..."
+echo "live-boot: caching reboot files..."
prompt=1
if [ "${NOPROMPT}" = "Yes" ]
@@ -166,10 +171,10 @@ do
cache_path "${path}"
done
-mount -o remount,ro /live/overlay
+mount -o remount,ro /live/overlay > /dev/null 2>&1
# Check if we need to eject the drive
-if grep -qs "cdrom-detect/eject=false" /proc/cmdline ||
+if grep -qs "cdrom-detect/eject=false" /proc/cmdline || \
grep -qs "noeject" /proc/cmdline
then
return
diff --git a/bin/live-debconfig b/bin/live-debconfig
new file mode 100755
index 0000000..04389fc
--- /dev/null
+++ b/bin/live-debconfig
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+set -e
+
+# Setup local debconf
+if [ ! -e /var/lib/live/debconfig ]
+then
+ mkdir -p /var/lib/live/debconfig
+ chmod 0700 /var/lib/live/debconfig
+fi
+
+if [ ! -e /var/lib/live/debconfig/systemrc ]
+then
+
+cat > /var/lib/live/debconfig/systemrc << EOF
+Config: configdb
+Templates: templatedb
+
+Name: config
+Driver: File
+Mode: 644
+Reject-Type: password
+Filename: /var/lib/live/debconfig/config.dat
+
+Name: passwords
+Driver: File
+Mode: 600
+Backup: false
+Required: false
+Accept-Type: password
+Filename: /var/lib/live/debconfig/passwords.dat
+
+Name: configdb
+Driver: Stack
+Stack: config, passwords
+
+Name: templatedb
+Driver: File
+Mode: 644
+Filename: /var/lib/live/debconfig/templates.dat
+EOF
+
+fi
+
+DEBCONF_SYSTEMRC="/var/lib/live/debconfig/systemrc"
+export DEBCONF_SYSTEMRC
+
+if [ "${1}" = "--noscripts" ]
+then
+ exit
+fi
+
+# Run debconf scripts
+for _SCRIPT in /lib/live/debconfig/*
+do
+ if [ -x "${_SCRIPT}" ]
+ then
+ # FIXME: make scripts a multiselect
+ "${_SCRIPT}"
+ fi
+done
diff --git a/manpages/de/live-config.de.7 b/manpages/de/live-config.de.7
index 7b33805..356f3e3 100644
--- a/manpages/de/live-config.de.7
+++ b/manpages/de/live-config.de.7
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-CONFIG 7 06.06.2012 3.0~a39\-1 "Debian Live Projekt"
+.TH LIVE\-CONFIG 7 14.06.2012 3.0~a40\-1 "Debian Live Projekt"
.SH NAME
\fBlive\-config\fP \- System Konfiguration Skripte
diff --git a/manpages/en/live-config.7 b/manpages/en/live-config.7
index 2b7483f..827577d 100644
--- a/manpages/en/live-config.7
+++ b/manpages/en/live-config.7
@@ -6,7 +6,7 @@
.\" under certain conditions; see COPYING for details.
.\"
.\"
-.TH LIVE\-CONFIG 7 2012\-06\-06 3.0~a39-1 "Debian Live Project"
+.TH LIVE\-CONFIG 7 2012\-06\-14 3.0~a40-1 "Debian Live Project"
.SH NAME
\fBlive\-config\fR \- System Configuration Scripts
diff --git a/manpages/es/live-config.es.7 b/manpages/es/live-config.es.7
index cb1f077..4853e85 100644
--- a/manpages/es/live-config.es.7
+++ b/manpages/es/live-config.es.7
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-CONFIG 7 06.06.2012 3.0~a39\-1 "Proyecto Debian Live"
+.TH LIVE\-CONFIG 7 14.06.2012 3.0~a40\-1 "Proyecto Debian Live"
.SH NOMBRE
\fBlive\-config\fP \- Scripts de configuración del sistema
diff --git a/manpages/fr/live-config.fr.7 b/manpages/fr/live-config.fr.7
index b1147a8..2674d53 100644
--- a/manpages/fr/live-config.fr.7
+++ b/manpages/fr/live-config.fr.7
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-CONFIG 7 06.06.2012 3.0~a39\-1 "Projet Debian Live"
+.TH LIVE\-CONFIG 7 14.06.2012 3.0~a40\-1 "Projet Debian Live"
.SH NOM
\fBlive\-config\fP \- Scripts de configuration du système
diff --git a/manpages/it/live-config.it.7 b/manpages/it/live-config.it.7
index dd5119e..7e33604 100644
--- a/manpages/it/live-config.it.7
+++ b/manpages/it/live-config.it.7
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-CONFIG 7 06.06.2012 3.0~a39\-1 "Progetto Debian Live"
+.TH LIVE\-CONFIG 7 14.06.2012 3.0~a40\-1 "Progetto Debian Live"
.SH NOME
\fBlive\-config\fP \- Script di configurazione del sistema
diff --git a/manpages/po/de/live-config.7.po b/manpages/po/de/live-config.7.po
index 5f928f8..8e93020 100644
--- a/manpages/po/de/live-config.7.po
+++ b/manpages/po/de/live-config.7.po
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: live-config 3.0~a39-1\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"Project-Id-Version: live-config 3.0~a40-1\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Daniel Baumann <daniel at debian.org>\n"
"Language-Team: none\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
-msgstr "06.06.2012"
+msgid "2012-06-14"
+msgstr "14.06.2012"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
-msgstr "3.0~a39-1"
+msgid "3.0~a40-1"
+msgstr "3.0~a40-1"
#. type: TH
#: en/live-config.7:9
diff --git a/manpages/po/es/live-config.7.po b/manpages/po/es/live-config.7.po
index dd9c62f..561d8a9 100644
--- a/manpages/po/es/live-config.7.po
+++ b/manpages/po/es/live-config.7.po
@@ -5,8 +5,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: live-config 3.0~a39-1\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"Project-Id-Version: live-config 3.0~a40-1\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: 2012-04-07 17:19+0200\n"
"Last-Translator: Carlos Zuferri «chals» <chals at altorricon.com>\n"
"Language-Team: none\n"
@@ -25,14 +25,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
-msgstr "06.06.2012"
+msgid "2012-06-14"
+msgstr "14.06.2012"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
-msgstr "3.0~a39-1"
+msgid "3.0~a40-1"
+msgstr "3.0~a40-1"
#. type: TH
#: en/live-config.7:9
diff --git a/manpages/po/fr/live-config.7.po b/manpages/po/fr/live-config.7.po
index 238b6da..f529eaa 100644
--- a/manpages/po/fr/live-config.7.po
+++ b/manpages/po/fr/live-config.7.po
@@ -5,8 +5,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: live-config 3.0~a39-1\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"Project-Id-Version: live-config 3.0~a40-1\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: 2012-04-18 15:46+0200\n"
"Last-Translator: Carlos Zuferri «chals» <chals at altorricon.com>\n"
"Language-Team: <debian-live at lists.debian.org>\n"
@@ -25,14 +25,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
-msgstr "06.06.2012"
+msgid "2012-06-14"
+msgstr "14.06.2012"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
-msgstr "3.0~a39-1"
+msgid "3.0~a40-1"
+msgstr "3.0~a40-1"
#. type: TH
#: en/live-config.7:9
diff --git a/manpages/po/it/live-config.7.po b/manpages/po/it/live-config.7.po
index d4f2516..f67cd61 100644
--- a/manpages/po/it/live-config.7.po
+++ b/manpages/po/it/live-config.7.po
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: live-config 3.0~a39-1\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"Project-Id-Version: live-config 3.0~a40-1\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: 2011-12-06 08:01+0100\n"
"Last-Translator: skizzhg <skizzhg at gmx.com>\n"
"Language-Team: none\n"
@@ -23,14 +23,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
-msgstr "06.06.2012"
+msgid "2012-06-14"
+msgstr "14.06.2012"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
-msgstr "3.0~a39-1"
+msgid "3.0~a40-1"
+msgstr "3.0~a40-1"
#. type: TH
#: en/live-config.7:9
diff --git a/manpages/po/pt_BR/live-config.7.po b/manpages/po/pt_BR/live-config.7.po
index 0459e97..0f5c8fb 100644
--- a/manpages/po/pt_BR/live-config.7.po
+++ b/manpages/po/pt_BR/live-config.7.po
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: live-config 3.0~a39-1\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"Project-Id-Version: live-config 3.0~a40-1\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Tassia Camoes Araujo <tassia at gmail.com>\n"
"Language-Team: none\n"
@@ -23,14 +23,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
-msgstr "06-06-2012"
+msgid "2012-06-14"
+msgstr "14-06-2012"
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
-msgstr "3.0~a39-1"
+msgid "3.0~a40-1"
+msgstr "3.0~a40-1"
#. type: TH
#: en/live-config.7:9
diff --git a/manpages/pot/live-config.7.pot b/manpages/pot/live-config.7.pot
index 1b04486..7d0de50 100644
--- a/manpages/pot/live-config.7.pot
+++ b/manpages/pot/live-config.7.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-config VERSION\n"
-"POT-Creation-Date: 2012-06-06 19:12+0300\n"
+"POT-Creation-Date: 2012-06-14 07:57+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -25,13 +25,13 @@ msgstr ""
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "2012-06-06"
+msgid "2012-06-14"
msgstr ""
#. type: TH
#: en/live-config.7:9
#, no-wrap
-msgid "3.0~a39-1"
+msgid "3.0~a40-1"
msgstr ""
#. type: TH
diff --git a/manpages/pt_BR/live-config.pt_BR.7 b/manpages/pt_BR/live-config.pt_BR.7
index fdf3c75..20e37c0 100644
--- a/manpages/pt_BR/live-config.pt_BR.7
+++ b/manpages/pt_BR/live-config.pt_BR.7
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-CONFIG 7 06\-06\-2012 3.0~a39\-1 "Projeto Debian Live"
+.TH LIVE\-CONFIG 7 14\-06\-2012 3.0~a40\-1 "Projeto Debian Live"
.SH NOME
\fBlive\-config\fP \- Scripts para Configuração do Sistema
--
live-config
More information about the debian-live-changes
mailing list