Changeset 283 for branches/scripts/group
- Timestamp:
- Jun 24, 2009, 2:42:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripts/group/groupmod.cmd
r193 r283 1 1 /* GroupMod script for Samba Server for eCS (OS/2) */ 2 Version = '2. 1.3'2 Version = '2.2.0' 3 3 /* Copyright (C) netlabs.org 2007-2009 4 4 … … 37 37 call _SambaInit 38 38 39 call _SambaExtendSearchPath 40 39 41 parse arg '-'mode' "'group'"' 40 42 if group = "" & mode <> "" then parse arg '-'mode' 'group … … 140 142 script = VRParseFileName(script,'N') 141 143 144 /* smbd.exe */ 145 samba.!smbd = "" 146 if samba.!smbd = "" then do /* in current directory? */ 147 ok = SysFileTree('.\smbd.exe', exist.,'FO') 148 if exist.0 = 1 then samba.!smbd = exist.1 149 end 150 if samba.!smbd = "" then do /* in parent directory? */ 151 ok = SysFileTree('..\smbd.exe', exist.,'FO') 152 if exist.0 = 1 then samba.!smbd = exist.1 153 end 154 if samba.!smbd = "" then do /* in ..\BIN directory? */ 155 ok = SysFileTree('..\bin\smbd.exe', exist.,'FO') 156 if exist.0 = 1 then samba.!smbd = exist.1 157 end 158 if samba.!smbd = "" then do /* in SMB_EXE ? */ 159 samba.!smbd = SysSearchPath("SMB_EXE","SMBD.EXE") 160 end 161 if samba.!smbd = "" then do /* in PATH ? */ 162 samba.!smbd = SysSearchPath("PATH","SMBD.EXE") 163 end 164 165 samba.!bin = VRParseFileName(samba.!smbd,'DP') 166 if samba.!bin = "" then samba.!bin = samba.!tools 167 142 168 samba.!pwd_mkdb = SysSearchPath("PATH","pwd_mkdb.exe") 143 169 if samba.!pwd_mkdb = "" then do /* in current directory? */ … … 156 182 samba.!pwd_mkdb = SysSearchPath("SMB_SBIN","pwd_mkdb.exe") 157 183 end 184 return 185 186 _SambaExtendSearchPath: 187 /* Add binary and tools path to the PATH variable */ 188 old_path = value('PATH',, 'OS2ENVIRONMENT') 189 if pos(translate(samba.!bin';'),translate(old_path)) = 0 then do 190 if samba.!bin = samba.!tools then new_path = samba.!bin';' 191 else new_path = samba.!bin';'samba.!tools';' 192 ok = value('PATH', new_path || old_path, 'OS2ENVIRONMENT') 193 drop new_path 194 end 195 drop old_path 196 197 /* Add binary and tools path to the BEGINLIBPATH variable */ 198 old_beginlibpath = SysQueryExtLibPath("B") 199 if pos(translate(samba.!bin';'),translate(old_beginlibpath)) = 0 then do 200 if samba.!bin = samba.!tools then new_beginlibpath = samba.!bin';'old_beginlibpath 201 else new_beginlibpath = samba.!bin';'samba.!tools';'old_beginlibpath 202 ok = SysSetExtLibPath( new_beginlibpath, "B") 203 drop new_beginlibpath 204 end 205 drop old_beginlibpath 158 206 return 159 207
Note:
See TracChangeset
for help on using the changeset viewer.