PDA

View Full Version : [itcl] mountfile open doesn't work for scheduled scripts


Harm
01-04-2004, 12:17 PM
That's the code i use for testing, using ioFTPD 5.4.3r

set anuke(mtab) "C:/ioFTPD/etc/default.vfs"

proc autonuke {} {
global anuke
# Load mount table
if {[catch { mountfile open $anuke(mtab) }]!= 0} {return 1}
putlog "TEST: \"/\" is resolved to \"[resolve pwd "/"]\" using \"$anuke(mtab)\""
}
autonuke


That's what i get in ioFTPD.log when i run the script using a site command:
01-04-2004 18:10:11 TEST: "/" is resolved to "C:/ioFTPD/site" using "C:/ioFTPD/etc/default.vfs"

And that's what i get when i use the scheduler:
01-04-2004 18:10:44 TEST: "/" is resolved to "" using "C:/ioFTPD/etc/default.vfs"

darkone
01-04-2004, 12:36 PM
Oh, try opening userfile too :) (i think it requires one)

Harm
01-04-2004, 12:53 PM
Indeed, it has to be:

if {[catch { userfile open "sitebot" }]!= 0} {return 1}
if {[catch { mountfile open $anuke(mtab) }]!= 0} {return 1}

Thank you darkone.