To answer my own question: this happens because
aolserver/modules/tcl/nsperm/init.tcl is being called twice during startup.
Followup question:
1. Can anyone suggest how this might happen? Point me to a description of
how the startup procedure works so I can figure out how this got in the
queue twice?
Observation:
2. The second run does no harm. As long as passwd, group and the other
files are coded correctly the permissions are set up.
Notes for others with similar problems:
3. I demonstrated that this init.tcl was being run twice by adding some
ns_log calls so the execution would be traced in the log, or to the console
in foreground startup mode:
proc init_nsperm { } {
ns_log Notice "Begin init_nsperm"
...
#
# Initialize the module
#
ns_log Notice "Begin /opt/usr/local/aolserver3/modules/tcl/nsperm/init.tcl"
init_nsperm
ns_log Notice "End /opt/usr/local/aolserver3/modules/tcl/nsperm/init.tcl"
4. The error seems to cause init.tcl to abort. Before I discovered that the
second, aborted, run was harmless I replaced the simple eval in the loops
that parse the passwd and group files with an eval inside a catch that
ns_log's what happened:
# Instead of bare eval ...
#eval $cmd
# ... eval in catch.
if { [catch {eval $cmd} permerr] == 1 } {
ns_log Notice "init_nsperm $action: $permerr"
}
Eric Lee