[SCM] live-config branch, debian-next, updated. debian/3.0_a42-1-3-g95841e3

Daniel Baumann daniel at debian.org
Thu Jul 12 17:58:02 UTC 2012


The following commit has been merged in the debian-next branch:
commit 95841e3d80e5707e0b78f1d14760426c13936868
Author: Daniel Baumann <daniel at debian.org>
Date:   Thu Jul 12 19:57:58 2012 +0200

    Removing debconf backend, splitting out into seperate package.

diff --git a/Makefile b/Makefile
index 0e1fd75..62daacf 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,6 @@ 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
diff --git a/backends/debconf/0010-hostname b/backends/debconf/0010-hostname
deleted file mode 100755
index c25b34b..0000000
--- a/backends/debconf/0010-hostname
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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 [ -e /etc/os-release ]
-		then
-			. /etc/os-release
-			_HOSTNAME="${ID:-debian}"
-		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/0010-hostname.templates b/backends/debconf/0010-hostname.templates
deleted file mode 100644
index 359572f..0000000
--- a/backends/debconf/0010-hostname.templates
+++ /dev/null
@@ -1,12 +0,0 @@
-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/0020-ifupdown b/backends/debconf/0020-ifupdown
deleted file mode 100755
index bc3d129..0000000
--- a/backends/debconf/0020-ifupdown
+++ /dev/null
@@ -1,241 +0,0 @@
-#!/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/0020-ifupdown.templates b/backends/debconf/0020-ifupdown.templates
deleted file mode 100644
index 21f39ce..0000000
--- a/backends/debconf/0020-ifupdown.templates
+++ /dev/null
@@ -1,61 +0,0 @@
-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/0030-sysvinit b/backends/debconf/0030-sysvinit
deleted file mode 100755
index eff22c0..0000000
--- a/backends/debconf/0030-sysvinit
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/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/0030-sysvinit.templates b/backends/debconf/0030-sysvinit.templates
deleted file mode 100644
index 3f42141..0000000
--- a/backends/debconf/0030-sysvinit.templates
+++ /dev/null
@@ -1,19 +0,0 @@
-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/debconf/0100-selinux b/backends/debconf/0100-selinux
deleted file mode 100755
index 840e7ca..0000000
--- a/backends/debconf/0100-selinux
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/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/0100-selinux.templates b/backends/debconf/0100-selinux.templates
deleted file mode 100644
index 8c7363c..0000000
--- a/backends/debconf/0100-selinux.templates
+++ /dev/null
@@ -1,11 +0,0 @@
-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/0200-openssh-server b/backends/debconf/0200-openssh-server
deleted file mode 100755
index 7682507..0000000
--- a/backends/debconf/0200-openssh-server
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/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
-			ssh-keygen -q -f /etc/ssh/ssh_host_${_PROTOCOL}_key -N "" -t ${_PROTOCOL}
-		fi
-	fi
-done
diff --git a/backends/debconf/0200-openssh-server.templates b/backends/debconf/0200-openssh-server.templates
deleted file mode 100644
index 8b13789..0000000
--- a/backends/debconf/0200-openssh-server.templates
+++ /dev/null
@@ -1 +0,0 @@
-

-- 
live-config



More information about the debian-live-changes mailing list