Skip to content

Commit

Permalink
Adding live-initramfs 1.99.2-1.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Sep 23, 2007
1 parent bee74e5 commit b15f95e
Show file tree
Hide file tree
Showing 45 changed files with 2,141 additions and 1,322 deletions.
7 changes: 4 additions & 3 deletions Makefile
Expand Up @@ -108,9 +108,10 @@ uninstall:
update:
set -e; for FILE in docs/parameters.txt manpages/*.en.*; \
do \
sed -i -e 's/2007\\-09\\-03/2007\\-09\\-10/' \
-e 's/03.09.2007/10.09.2007/' \
-e 's/1.99.1/1.99.2/' \
sed -i -e 's/2007\\-09\\-10/2007\\-09\\-17/' \
-e 's/2007-09-10/2007-09-17/' \
-e 's/10.09.2007/17.09.2007/' \
-e 's/1.99.2/1.99.3/' \
$$FILE; \
done

Expand Down
12 changes: 9 additions & 3 deletions bin/live-preseed
@@ -1,19 +1,25 @@
#! /bin/sh
#!/bin/sh

set -e

PATH=/usr/sbin:/usr/bin:/sbin:/bin

root="$1"
question="$2"
value="$3"
seen="$4"

[ "$seen" ] || seen=true

if ! (echo "SET $question $value"; echo "FSET $question seen $seen") | chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null; then
chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null <<EOF
if ! (echo "SET $question $value"; echo "FSET $question seen $seen") | chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null
then

chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null << EOF
REGISTER debian-installer/dummy $question
SET $question $value
FSET $question seen $seen
EOF

fi

exit 0
80 changes: 49 additions & 31 deletions bin/live-reconfigure
@@ -1,50 +1,68 @@
#! /bin/sh

set -e

export PATH=/usr/bin:/usr/sbin:/sbin:/bin

frontend=noninteractive

findcommandinroot() {
ROOT="$1/"
shift
while [ "$#" -ge 1 ]; do
P="$PATH"
while [ "$P" ]; do
D=${P%%:*}
P=${P#*:}
if [ "$D" = "$P" ]; then
P=
fi
if [ -z "$D" ]; then
D=.
fi
if [ -x "$ROOT$D/$1" ]; then
echo "$D/$1"
return 0
fi
done
shift
done
return 1
findcommandinroot ()
{
ROOT="$1/"
shift

while [ "$#" -ge 1 ]
do
P="$PATH"

while [ "$P" ]
do
D=${P%%:*}
P=${P#*:}

if [ "$D" = "$P" ]
then
P=
fi

if [ -z "$D" ]
then
D=.
fi

if [ -x "$ROOT$D/$1" ]
then
echo "$D/$1"
return 0
fi
done

shift
done

return 1
}

runcommandinroot() {
C=$(findcommandinroot "$1" "$2")
ROOT="$1"
shift
shift
[ -n "$C" ] && chroot "$ROOT" "$C" "$@"
runcommandinroot ()
{
C=$(findcommandinroot "$1" "$2")
ROOT="$1"

shift
shift

[ -n "$C" ] && chroot "$ROOT" "$C" "$@"
}

root="$1"
package="$2"

version=$(runcommandinroot "$root" dpkg-query -W --showformat='${Version}' "$package" 2>/dev/null) || version=""

if [ -z "$version" ]; then
echo >&2 "$0: package '$package' is not installed"
exit 0
if [ -z "$version" ]
then
echo >&2 "$0: package '$package' is not installed"
exit 0
fi

runcommandinroot "$root" dpkg-reconfigure -fnoninteractive --no-reload "$package"
Expand Down

0 comments on commit b15f95e

Please sign in to comment.