#--------------------------------------------------------#
sub build_mount_table #---Strip device and mount names from fstab
{
my $i = 0;
foreach my $textline (@SMBENTRIES)
{
($DEVICES[$i], $MOUNTPOINTS[$i]) = split(/\s+/,$textline);
$i++;
}
}
#--------------------------------------------------------#
sub print_mount_table #---Print out shares and mountpoints to be used
{
for (my $i = 0 ; $i < ($#SMBENTRIES + 1) ; $i++)
{
print"SHARE: $DEVICES[$i] MOUNT: $MOUNTPOINTS[$i]\n";
}
}
#--------------------------------------------------------#
sub mount_table_all #---Mount all in table with common password
{
for (my $i = 0 ; $i <= $#DEVICES; $i++)
{
system("mount -t smbfs $DEVICES[$i] $MOUNTPOINTS[$i] -o username=$USERNAME,password=$PASSWORD");
}
}
#--------------------------------------------------------#