File: preseed_command

package info (click to toggle)
preseed 1.66
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, jessie-kfreebsd-proposed-updates
  • size: 776 kB
  • sloc: sh: 390; perl: 105; makefile: 5
file content (23 lines) | stat: -rwxr-xr-x 468 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e
# Run a preseeded command.
ct=$1

. /usr/share/debconf/confmodule

log () {
	logger -t preseed "$@"
}

db_get "$ct"
command="$RET"
if [ "$command" != "" ]; then
	log "running preseed command $ct: $command"
	code=0
	log-output sh -c "$command" || code=$?
	if [ "$code" != 0 ]; then
		db_subst preseed/command_failed COMMAND "$command"
		db_subst preseed/command_failed CODE "$code"
		db_input critical preseed/command_failed || true
		db_go || true
	fi
fi