Thread Bessere Variante gesucht (Mounten) (1 answers)
Opened by redpantyhose at 2006-08-18 16:11

redpantyhose
 2006-08-18 16:26
#68994 #68994
User since
2005-12-08
12 Artikel
BenutzerIn
[default_avatar]
Das Ganze ohne /sbin/mount

Code: (dl )
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-->

View full thread Bessere Variante gesucht (Mounten)