File: tutorial-back

package info (click to toggle)
debconf 1.5.91
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,180 kB
  • sloc: perl: 8,500; sh: 262; python: 182; makefile: 144
file content (33 lines) | stat: -rwxr-xr-x 565 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
24
25
26
27
28
29
30
31
32
33
#!/bin/sh -e

# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0

# This conf script is capable of backing up
db_capb backup

STATE=1
while [ "$STATE" != 0 ] && [ "$STATE" != 3 ]; do
	case "$STATE" in
	1)
		# Do you like debian?
		db_input medium foo/like_debian || true
	;;

	2)
		# Check to see if they like debian.
		db_get foo/like_debian
		if [ "$RET" = "false" ]; then
			# Poor misguided one..
			db_input high foo/why_debian_is_great || true
		fi
	;;
	esac

	if db_go; then
		STATE=$((STATE + 1))
	else
		STATE=$((STATE - 1))
	fi
done