1 |
unnilennium |
1.1 |
--- smeserver-tw-logonscript-1.3/root/etc/e-smith/templates/home/e-smith/files/samba/netlogon/netlogon.bat/00netlogon.TemplateWarningFix 2008-08-05 16:47:10.000000000 +1200 |
2 |
|
|
+++ smeserver-tw-logonscript-1.3/root/etc/e-smith/templates/home/e-smith/files/samba/netlogon/netlogon.bat/00netlogon 2009-11-19 15:49:56.000000000 +1300 |
3 |
|
|
@@ -7,7 +7,7 @@ |
4 |
|
|
my $db = esmith::ConfigDB->open_ro(); |
5 |
|
|
my $smb = $db->get("smb"); |
6 |
|
|
my $server_name = $smb->prop("ServerName"); |
7 |
|
|
- my $logon_drive = $smb->prop("LogonDrive"); |
8 |
|
|
+ my $logon_drive = $smb->prop("LogonDrive") || H; |
9 |
|
|
my @letters = ('G'..'Y'); |
10 |
|
|
|
11 |
|
|
$OUT.= "set SERVER=$server_name\r\n"; |
12 |
|
|
@@ -18,9 +18,12 @@ |
13 |
|
|
$OUT.="rem --- %username%.bat has been generated earlier\r\n"; |
14 |
|
|
$OUT.="rem --- (see smb.conf, netlogon share, preexec statement)\r\n"; |
15 |
|
|
$OUT.="rem --- to be able to assign drive mappings due to group membership\r\n"; |
16 |
|
|
- foreach my $letter (@letters){ |
17 |
|
|
- if(($letter ne $logon_drive) and ($letter ne "Z")){ |
18 |
|
|
+ |
19 |
|
|
+ if(ref(@letters) eq 'ARRAY'){ |
20 |
|
|
+ foreach my $letter (@letters){ |
21 |
|
|
+ if(($letter ne $logon_drive) and ($letter ne "Z")){ |
22 |
|
|
$OUT.="if exist $letter: net use $letter: /del /y\r\n"; |
23 |
|
|
+ } |
24 |
|
|
} |
25 |
|
|
} |
26 |
|
|
|