Changeset 4e9719b for fedkit/smbmount.FreeBSD.pl
- Timestamp:
- Mar 9, 2010 2:44:44 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 86a7bb8
- Parents:
- 9b3627e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/smbmount.FreeBSD.pl
r9b3627e r4e9719b 46 46 open(TM, "/usr/local/federation/etc/userconf")or die("Failed to open userconf"); 47 47 open(CONFIG, ">/etc/nsmb.conf") or die("Failed to open /etc/nsmb.conf"); 48 open(MAP, ">$AMDMAP") or die("Failed to open $AMDMAP");49 open(PMAP, ">$PAMDMAP") or die("Failed to open $PAMDMAP");48 #open(MAP, ">$AMDMAP") or die("Failed to open $AMDMAP"); 49 #open(PMAP, ">$PAMDMAP") or die("Failed to open $PAMDMAP"); 50 50 open(FSTAB,">>$FSTAB") or die("Cannot Open File $FSTAB"); 51 51 52 52 print FSTAB "\n# SMB Configuration Generated by smbmount.pl\n"; 53 print MAP "# AMD Configuration Generated by smbmount.pl\n";53 #print MAP "# AMD Configuration Generated by smbmount.pl\n"; 54 54 print CONFIG "# SMB Configuration Generated by smbmount.pl\n\n"; 55 55 print CONFIG "[$SHARE]\naddr=$ADDR\n\n"; … … 76 76 77 77 print FSTAB "//$user\@$SHARE/$user\t"; 78 print FSTAB "$ AMDROOT$homedir\t$FSTYPE\t";79 print FSTAB " noauto,rw,-N,-f744,-d755,-u$uid,-g$gid\t0\t0\n";78 print FSTAB "$homedir\t$FSTYPE\t"; 79 print FSTAB "rw,-N,-f744,-d755,-u$uid,-g$gid\t0\t0\n"; 80 80 81 print MAP "\n$userlc type:=program;fs:=$AMDROOT$homedir;\\\n";82 print MAP "mount:=\"$MOUNT mount $AMDROOT$homedir\";\\\n";83 print MAP "unmount:=\"$UMOUNT unmount $AMDROOT$homedir\";";81 #print MAP "\n$userlc type:=program;fs:=$AMDROOT$homedir;\\\n"; 82 #print MAP "mount:=\"$MOUNT mount $AMDROOT$homedir\";\\\n"; 83 #print MAP "unmount:=\"$UMOUNT unmount $AMDROOT$homedir\";"; 84 84 85 85 # … … 91 91 if($user =~ m/$PUSER/i) { 92 92 print FSTAB "//$user\@$SHARE/proj-$PNAME\t"; 93 print FSTAB " $AMDROOT/proj\t$FSTYPE\t";94 print FSTAB " noauto,rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";93 print FSTAB "/proj/$PNAME\t$FSTYPE\t"; 94 print FSTAB "rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n"; 95 95 96 print PMAP "$PNAME type:=program;fs:=$AMDROOT/proj;\\\n";97 print PMAP "mount:=\"$MOUNT mount $AMDROOT/proj\";\\\n";98 print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/proj\";\n";96 #print PMAP "$PNAME type:=program;fs:=$AMDROOT/proj;\\\n"; 97 #print PMAP "mount:=\"$MOUNT mount $AMDROOT/proj\";\\\n"; 98 #print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/proj\";\n"; 99 99 100 if(! -d " $AMDROOT/proj") {101 system("$MKDIR -p $AMDROOT/proj") &&100 if(! -d "/proj/$PNAME") { 101 system("$MKDIR -p /proj/$PNAME") && 102 102 die("Failed to make directory"); 103 103 } 104 104 if ( $share) { 105 105 print FSTAB "//$user\@$SHARE/share\t"; 106 print FSTAB " $AMDROOT/share\t$FSTYPE\t";107 print FSTAB " noauto,rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";106 print FSTAB "/share\t$FSTYPE\t"; 107 print FSTAB "rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n"; 108 108 109 print PMAP "$PNAME type:=program;fs:=$AMDROOT/share\\\n";110 print PMAP "mount:=\"$MOUNT mount $AMDROOT/share\";\\\n";111 print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/share\";\n";109 #print PMAP "$PNAME type:=program;fs:=$AMDROOT/share\\\n"; 110 #print PMAP "mount:=\"$MOUNT mount $AMDROOT/share\";\\\n"; 111 #print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/share\";\n"; 112 112 113 if(! -d " $AMDROOT/share") {114 system("$MKDIR -p $AMDROOT/share") &&113 if(! -d "/share") { 114 system("$MKDIR -p /share") && 115 115 die("Failed to make directory"); 116 116 } … … 122 122 close(CONFIG); 123 123 close(FSTAB); 124 close(MAP); 125 close(PMAP); 124 print("Mounting the $FSTYPE versions of everything\n"); 125 system("$MOUNT -a -t $FSTYPE"); 126 #close(MAP); 127 #close(PMAP); 126 128 127 print "Starting the automounter: $AMD -l syslog -a $AMDROOT $HOMEROOT $AMDMAP $PROJROOT $PAMDMAP\n";128 system("$AMD -l syslog -a $AMDROOT $HOMEROOT $AMDMAP $PROJROOT $PAMDMAP") && die("Unable to start amd");129 #print "Starting the automounter: $AMD -l syslog -a $AMDROOT $HOMEROOT $AMDMAP $PROJROOT $PAMDMAP\n"; 130 #system("$AMD -l syslog -a $AMDROOT $HOMEROOT $AMDMAP $PROJROOT $PAMDMAP") && die("Unable to start amd");
Note: See TracChangeset
for help on using the changeset viewer.