File: stage1

package info (click to toggle)
base-config 0.33.2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 472 kB
  • ctags: 171
  • sloc: sh: 777; perl: 538; makefile: 47; ansic: 27
file content (23 lines) | stat: -rwxr-xr-x 757 bytes parent folder | download
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
. /usr/share/debconf/confmodule

db_title 'Debian System Configuration'

# Test to see if this package is being installed in debconf's noninteractive
# mode. If so, there is no root password, and they didn't see this question.
# And the package is probably being installed into the base chroot as the
# boot floppies build. If so, let the postinst know by returning an error code
db_fget base-config/root-password isdefault
if [ -z "`fgrep root /etc/passwd | cut -d : -f 2`" -a "$RET" = true ]; then
	exit 1
fi

# Turn shadow on/off                                            
if [ -x /usr/sbin/shadowconfig ]; then
	db_get base-config/shadow
	if [ "$RET" = true ]; then
		shadowconfig on >/dev/null
	else
		shadowconfig off >/dev/null
	fi
fi