File: postinst

package info (click to toggle)
vold 1.1-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 112 kB
  • ctags: 66
  • sloc: cpp: 508; makefile: 56; sh: 31; perl: 16
file content (28 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl
# vold.postinst (c) 1998 David van Leeuwen

# This script tries to generate /etc/voltab

$arg=shift or die "Called without argument!";
$configure=$abort_upgrade=$abort_remove=$abort_deconfigure=0;

# parse dpkg's argument:
$arg =~ s/-/_/g;
eval "\$$arg=1;";
    
# this is the most important option:
if ($configure) {
    chmod 04755,"/usr/bin/volq";
    system "/usr/sbin/voldconfig";
    print "  You can modify /etc/voltab manually, or run /usr/sbin/voldconfig at any time\n";
    if ($CHILD_ERROR) {
	print "  Vold is not configured\n";
	exit 1;
    }
    system "update-rc.d vold defaults > /dev/null";
    system "/etc/init.d/vold start";
}

exit 0;