5 # Where to read local configuration:
6 my $pokinom_config = '~/monikop/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 # Return sorted intersection of arrays which are supposed to have unique
36 my @intersection = ();
39 foreach $element (@_) { $count{$element}++ }
40 foreach $element (keys %count) {
41 push @intersection, $element if $count{$element} > 1;
46 if (qx(whoami
) eq "bertb\n") {
47 qx(killall pokinom
&> /dev/null
);
48 # Find checkable (i.e. mounted) disks
49 my @raw_mount_points = grep (s/\S+ on (.*) type .*/$1/, qx/mount/);
50 chomp @raw_mount_points;
51 my @sources = intersection
@raw_mount_points, @usable_mount_points;
55 print "FIXME: no action yet.";
58 # qx(umount /dev/disk/by-label/Platte_* && fsck -fp /dev/disk/by-label/Platte_*);
61 print "$0: only root can run this.\n";