File: in-target

package info (click to toggle)
debian-installer-utils 1.45etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 516 kB
  • ctags: 18
  • sloc: sh: 581; ansic: 106; makefile: 72
file content (25 lines) | stat: -rwxr-xr-x 417 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -e
. /lib/chroot-setup.sh

if ! chroot_setup; then
	logger -t in-target -- "Unexpected error; command not executed: '$@'"
	exit 1
fi

DEBCONF_READFD=0
export DEBCONF_READFD
DEBCONF_WRITEFD=3
export DEBCONF_WRITEFD
DEBIAN_FRONTEND=passthrough
export DEBIAN_FRONTEND
ERRCODE=0
log-output -t in-target chroot /target "$@" || ERRCODE=$?

chroot_cleanup

if [ "$ERRCODE" != 0 ]; then
	exit 1
else
	exit 0
fi