This file is indexed.

postinst is in noflushd 2.8-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh

set -e

CONFFILE=/etc/default/noflushd

update_param() {
	
	eval local old=\"'$'$1\"
	eval local new=\"'$'new_$1\"
	
	if test "$old" = "$new"; then
		return
	fi
	
	if test -z "$old"; then
		grep -Eq "^ *$1=" "$CONFFILE" || echo "$1=" >> "$CONFFILE"
	fi

	# Careful here! Both DISKS and PARAMS may contain '/' (or just about
	# any other character. In order not to confuse ed, we use a delimiter
	# for the regexp that very rarely occurs in path names.
	printf "%%s?^ *$1=.*?$1=\"$new\"?\nw\nq\n" | ed -s "$CONFFILE"
}
		
. /usr/share/debconf/confmodule

if test -e "$CONFFILE"; then
	. "$CONFFILE"
else
	cat > "$CONFFILE" << EOF
# This is a configuration file for /etc/init.d/noflushd.

# Tune this file to suit your needs.  For a standard laptop setup,
# you stand a good chance that simply uncommenting the entries
# for TIMEOUT, and DISKS will suffice.

# Time in minutes before a disk is spun down. The disk is only spun
# down after this much time has passed without any reads from the disk.
TIMEOUT=

# Disks to spin down. Noflushd currently only works with ide hard disks;
# scsi disks require a kernel patch. You may spin down multiple disks by
# listing them all here separated by spaces. If this variable is unset,
# noflushd tries to auto-detect all disks on the system, and spins them
# down using the default timeout given above.
DISKS=

# If you prefer to craft your own set of parameters to handle more complex
# situations, uncomment this line and see noflushd(8) for details about the
# parameters the daemon takes. Note that if this line is uncommented, the
# TIMEOUT and DISKS lines above are ignored.
#PARAMS="-r /dev/sdb -n 60,5 /dev/hda -t 15,default /dev/hdc"
EOF
fi

db_get noflushd/timeout
new_TIMEOUT="$RET"
db_get noflushd/disks
new_DISKS="$RET"
db_get noflushd/params
new_PARAMS="$RET"

for i in TIMEOUT DISKS PARAMS; do
	update_param "$i"
done

db_stop

# There seem to be versions of prerm around that fail to properly
# stop the daemon. Try again here.
if [ -x /etc/init.d/noflushd ]; then
	if [ -x /usr/sbin/invoke-rc.d ]; then
		invoke-rc.d noflushd stop || :
	else
		/etc/init.d/noflushd stop || :
	fi
fi

## Automatically added by dh_installinit
if [ -x "/etc/init.d/noflushd" ]; then
	update-rc.d noflushd defaults 80 10 >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d noflushd start || exit $?
	else
		/etc/init.d/noflushd start || exit $?
	fi
fi
# End automatically added section
#