Changeset 283 for branches/scripts
- Timestamp:
- Jun 24, 2009, 2:42:01 PM (16 years ago)
- Location:
- branches/scripts
- Files:
-
- 4 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 -
branches/scripts/smb_init/readme.smb_init
r251 r283 1 Samba Server for eCS (OS/2) init script Version 3. 0.31 Samba Server for eCS (OS/2) init script Version 3.1.0 2 2 ===================================================== 3 3 … … 26 26 smb {start|stop|restart|reload|status|test} 27 27 28 In addition a plugin feature found in IBM's TCPSTART.CMD is present in29 smb.cmd:28 In addition a similar plugin feature found in IBM's TCPSTART.CMD is present 29 in smb.cmd: 30 30 31 31 - If a file named B4SMB.CMD is found in the Samba directory, it will be run … … 35 35 after the Samba services have been stopped. 36 36 37 smb.cmd is also used by SWAT and smbmon.exe to start or stop the Samba daemons 37 smb.cmd is also used by SWAT and smbmon.exe to start or stop the Samba daemons. 38 38 39 39 In addition Samba daemons that refuse to stop peacefully are killed using -
branches/scripts/smb_init/smb.cmd
r268 r283 1 /* Samba Server for eCS (OS/2) init script Version 3. 0.41 /* Samba Server for eCS (OS/2) init script Version 3.1.0 2 2 Copyright (C) netlabs.org 2007-2009 3 3 … … 60 60 say 'Samba services are not running. Aborting...' 61 61 ok = directory(OldDir) 62 exit - 362 exit -4 63 63 end 64 64 samba.!bin'\smbstatus.exe smbd 2>NUL' … … 156 156 end 157 157 UnixETC = UnixRoot'\etc' 158 /* Make sure it exists */ 159 ok = SysMkDir(UnixETC) 158 160 159 161 /* Find out various directories */ … … 198 200 samba.!smbconf = stream(ETC'\samba\smb.conf','c','query exists') 199 201 if samba.!smbconf = "" then do 200 say ETC'\samba\smb.conf is missing. Aborting...' 202 say ETC'\samba\smb.conf is missing.' 203 say 'Try running sscc.exe /install to create it! Aborting...' 201 204 exit -2 205 end 206 207 /* Check if kLIBC password files exist */ 208 samba.!masterpasswd = stream(unixetc'\master.passwd','c','query exists') 209 if samba.!masterpasswd = "" then do 210 say unixetc'\master.passwd is missing.' 211 say 'Try running sscc.exe /install to create it! Aborting...' 212 exit -3 213 end 214 215 samba.!pwddb = stream(unixetc'\pwd.db','c','query exists') 216 if samba.!pwddb = "" then do 217 say unixetc'\pwd.db is missing.' 218 say 'Try running usermod to create it. Aborting...' 219 exit -3 220 end 221 222 samba.!spwddb = stream(unixetc'\spwd.db','c','query exists') 223 if samba.!spwddb = "" then do 224 say unixetc'\spwd.db is missing.' 225 say 'Try running usermod to create it. Aborting...' 226 exit -3 202 227 end 203 228 … … 257 282 samba.!lock_dir = translate(IniGet("lock directory", "global", samba.!smbconf),'\','/') 258 283 samba.!debuglevel = IniGet("log level", "global", samba.!smbconf) 284 285 /* make sure these directories exist */ 286 ok = SysMkDir(samba.!log_path) 287 ok = SysMkDir(samba.!lock_dir) 259 288 260 289 ok = value("SMB_LOGS",samba.!log_path,"OS2ENVIRONMENT") -
branches/scripts/user/usermod.cmd
r193 r283 1 1 /* UserMod script for Samba Server for eCS (OS/2) */ 2 Version = '2. 1.5'2 Version = '2.2.0' 3 3 /* Copyright (C) netlabs.org 2007-2009 4 4 … … 36 36 call _SambaInit 37 37 38 call _SambaExtendSearchPath 39 38 40 parse arg '-'mode' "'User'"' 39 41 if User = "" & mode <> "" then parse arg '-'mode' 'User … … 163 165 script = VRParseFileName(script,'N') 164 166 167 /* smbd.exe */ 168 samba.!smbd = "" 169 if samba.!smbd = "" then do /* in current directory? */ 170 ok = SysFileTree('.\smbd.exe', exist.,'FO') 171 if exist.0 = 1 then samba.!smbd = exist.1 172 end 173 if samba.!smbd = "" then do /* in parent directory? */ 174 ok = SysFileTree('..\smbd.exe', exist.,'FO') 175 if exist.0 = 1 then samba.!smbd = exist.1 176 end 177 if samba.!smbd = "" then do /* in ..\BIN directory? */ 178 ok = SysFileTree('..\bin\smbd.exe', exist.,'FO') 179 if exist.0 = 1 then samba.!smbd = exist.1 180 end 181 if samba.!smbd = "" then do /* in SMB_EXE ? */ 182 samba.!smbd = SysSearchPath("SMB_EXE","SMBD.EXE") 183 end 184 if samba.!smbd = "" then do /* in PATH ? */ 185 samba.!smbd = SysSearchPath("PATH","SMBD.EXE") 186 end 187 188 samba.!bin = VRParseFileName(samba.!smbd,'DP') 189 if samba.!bin = "" then samba.!bin = samba.!tools 190 165 191 samba.!pwd_mkdb = SysSearchPath("PATH","pwd_mkdb.exe") 166 192 if samba.!pwd_mkdb = "" then do /* in current directory? */ … … 179 205 samba.!pwd_mkdb = SysSearchPath("SMB_SBIN","pwd_mkdb.exe") 180 206 end 207 return 208 209 _SambaExtendSearchPath: 210 /* Add binary and tools path to the PATH variable */ 211 old_path = value('PATH',, 'OS2ENVIRONMENT') 212 if pos(translate(samba.!bin';'),translate(old_path)) = 0 then do 213 if samba.!bin = samba.!tools then new_path = samba.!bin';' 214 else new_path = samba.!bin';'samba.!tools';' 215 ok = value('PATH', new_path || old_path, 'OS2ENVIRONMENT') 216 drop new_path 217 end 218 drop old_path 219 220 /* Add binary and tools path to the BEGINLIBPATH variable */ 221 old_beginlibpath = SysQueryEXtLibPath("B") 222 if pos(translate(samba.!bin';'),translate(old_beginlibpath)) = 0 then do 223 if samba.!bin = samba.!tools then new_beginlibpath = samba.!bin';'old_beginlibpath 224 else new_beginlibpath = samba.!bin';'samba.!tools';'old_beginlibpath 225 ok = SysSetExtLibPath( new_beginlibpath, "B") 226 drop new_beginlibpath 227 end 228 drop old_beginlibpath 181 229 return 182 230
Note:
See TracChangeset
for help on using the changeset viewer.