#!/usr/bin/perl
$mnttab_struct = "a32 a32 I L";
open(MTAB, "/etc/mtab") || die "Cannot open /etc/mtab: $!\n";
open(MNTTAB, ">/etc/mnttab") || die "Cannot open /etc/mnttab: $!\n";
while(<MTAB>) {
chop;
/^(\S*)\s(\S*)\s(\S*)\s.*$/;
$device = $1;
$mountpt = $2;
$fstype = $3;
if($fstype ne "nfs" && $fstype ne "proc") {
$mnttab_rec =
pack($mnttab_struct, $device, $mountpt, 0x9d2f, time());
syswrite(MNTTAB, $mnttab_rec, 72);
print "Made entry for: $device $mountpt $fstype\n";
}
}
close(MNTTAB);
exit 0;
--===_0_Wed_May__3_05:44:16_CDT_1995--
=========================================================================
|