summaryrefslogtreecommitdiff
path: root/bin/live-preseed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-01 13:31:18 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:09 +0100
commitc967ebfc4e43fb16a0c2c140c66900712be95ab7 (patch)
tree74a8a142d7d6ceadcd9c4cb23ee3819fd8739336 /bin/live-preseed
parent65721717c4e37f6cec9e66f2ac355746490338ab (diff)
downloadlive-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.tar.gz
live-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.zip
Merging casper 1.216.
Diffstat (limited to 'bin/live-preseed')
-rwxr-xr-xbin/live-preseed23
1 files changed, 15 insertions, 8 deletions
diff --git a/bin/live-preseed b/bin/live-preseed
index d98c4f3..add29bd 100755
--- a/bin/live-preseed
+++ b/bin/live-preseed
@@ -4,22 +4,29 @@ set -e
PATH=/usr/sbin:/usr/bin:/sbin:/bin
+# Only do this once
+if [ -z "${DEBCONF_REDIR}" ]
+then
+ exec <&4
+ export DEBIAN_HAS_FRONTEND=1
+ export DEBCONF_REDIR=1
+fi
+
root="${1}"
+. "$root/usr/share/debconf/confmodule"
+
question="${2}"
value="${3}"
seen="${4}"
[ "${seen}" ] || seen=true
-if ! (echo "SET ${question} ${value}"; echo "FSET ${question} seen ${seen}") | chroot "${1}" /usr/bin/debconf-communicate -fnoninteractive live-initramfs >/dev/null
+if ! db_set "${question}" "${value}"
then
-
-chroot "${1}" /usr/bin/debconf-communicate -fnoninteractive live-initramfs >/dev/null << EOF
-REGISTER debian-installer/dummy ${question}
-SET ${question} ${value}
-FSET ${question} seen ${seen}
-EOF
-
+ db_register debian-installer/dummy "${question}"
+ db_set "${question}" "${value}"
fi
+db_fset "${question}" seen "${seen}"
+
exit 0