5 # Where to read local configuration:
6 my $pokinom_config = 'pokinom.config';
8 $pokinom_config = $ARGV[0]
11 ########################################
13 ########################################
14 # Possible mount points:
15 my @usable_mount_points;
17 # Other settings from $pokinom_config, not used here.
18 my $path_under_mount_point;
19 my $path_under_mount_point_backed_up;
20 my $path_under_mount_point_being_deleted;
25 my $interrupted_prefix;
26 my $shut_down_when_done;
28 my $rsync_partial_dir_name;
30 # Local changes to the above.
31 eval `cat $pokinom_config`;
33 if (qx(whoami
) eq "root\n") {
34 qx(killall pokinom
&> /dev/null
);
35 # Find checkable (i.e. mounted) disks
36 my @mount_output = qx/mount/;
39 my ($device, $mount_point) = /(\S+) on (.*) type .*/;
41 if ($_ eq $mount_point) {
42 $devices{$mount_point} = $device;
44 } @usable_mount_points;
47 my $device = $devices{$_};
48 open(PIPE
, "umount $device && fsck -fp $device |");
49 while ( defined( my $line = <PIPE
> ) ) {
57 print "$0: only root can run this.\n";