Das Ganze ohne /sbin/mount
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl
use strict;
use warnings;
my $mount_point = '/home';
local *ISMOUNTED;
my $mount_point_found = 0;
my $mount_pid = open(ISMOUNTED, '/proc/mounts') or die ("Muuuuuuuuuuuh !\n");
WHILE_ISMOUNTED: while(<ISMOUNTED>) {
if ( /(\s$mount_point\s)/) {
$mount_point_found = 1;
last;
}
}
close(ISMOUNTED);
waitpid($mount_pid, 0);
\n\n
<!--EDIT|redpantyhose|1155904024-->