Hi,i am trying to use command triggers.Need to invoke custom script when a file is unlocked.Followed the below steps:1) login as su2) edit /iw-home/local/iwlocal.cfg3) made entry iwatunlock nagendra unlocked.pl4) Placed unlocked.pl in /iw-home/local4) /etc/init.d/iw.local stop5) /etc/init.d/iw.local start6) ensured iwevents.log has 775 permissions8) login into workarea7) unlocked the file in workareabut no execution of unlocked.pl happend :-((if I use following command at prompt then execution of the script is happening/iw-home/iw-perl/bin/iwperl /iw-home/bin/iwatunlock.ipl "/iw-home/local/unlocked.pl &"Can anyone help me to understand the use of iwlocal.cfg & iwat?what went wrong in my first set of steps?-nagendra
I think the problem is that you entered iwatunlock nagendra unlocked.pl into your iw.cfg file.
The older iwat**** utilities require that services be created and maintained - the newer iwat utility registers the command in the backing store and is much easier to deal with.
unlocked.pl file has proper permissions to exectue."I would assume that Teamsite is running under a different account (on Unix) than what he is logged in with when he runs it manually." - yesteamsite is running as root 23909 0.0 5.5239592219040 ? S Sep 29 611:18 iwserver.sol -e /apps/iwevents.log /data/software/iw/iw-storeI logged in as nagendra while running the iwat.... on command prompt - it worked fine. Butfor iwlocal.cfg activity I have logged in as nagendra in teamsite workarea still script did not exectued.-nagendra
He did not. He entered it in iwlocal.cfg that a) is a proper place to do it and b) Does not exist in WindowsOne of that places in TS where configuration is not cross-platform portable
Hi, Just a question here.. If this needs to be done in windows, then what is the event registaration file is it iw.cfg or some other file. [size=2]As iwlocal.cfg does not exist in windows.. [/size]
could anybody post their iwlocal.cfg file?so that I can compare which one of the following is the correct entry for a custom script to registeriwatunlock nagendra unlocked.pliwatunlock nagendra /iw-home/local/unlocked.pliwatunlock nagendra /iw-home/bin/iwatunlock.ipl "/iw-home/local/unlocked.pl &"iwatunlock nagendra /iw-home/bin/iwatunlock.ipl /iw-home/local/unlocked.pliwatunlock nagendra /iw-home/bin/iwatunlock.ipl "unlocked.pl &"
I have following setup (solaris 9 ts 6.5 sp 2)ecoapp24-lgs: ls -al /data/software/iw/iw-home/local/iwlocal.cfg-rwxrwxrwx 1 root other 31 Oct 17 10:41 /data/software/iw/iw-home/local/iwlocal.cfgecoapp24-lgs: more /data/software/iw/iw-home/local/iwlocal.cfgiwatunlock kumarn35 unlocked.pl
ecoapp24-lgs: ls -al /data/software/iw/iw-home/local/unlocked.pl-rwxrwxr-x 1 kumarn35 iwadmin 377 Oct 14 13:33 /data/software/iw/iw-home/local/unlocked.plecoapp24-lgs: ls -al /data/software/iw/iw-home/local/bin/unlocked.pl-rwxrwxr-x 1 kumarn35 iwadmin 377 Oct 14 13:33 /data/software/iw/iw-home/local/bin/unlocked.plecoapp24-lgs: more /data/software/iw/iw-home/local/unlocked.pl#!/data/software/iw/iw-home/iw-perl/bin/iwperl -wuse TeamSite::Config;my $iwhome = TeamSite::Config::iwgethome(); # Get the iw-home from environmentif (open(TXT,">>$iwhome/local/unlocked.log")) { print TXT ("==========================================" . "\n"); my $numArgs = $#ARGV + 1; foreach $argnum (0 .. $#ARGV) { print TXT "$ARGV[$argnum]\n"; }}close(TXT);
#!/data/software/iw/iw-home/iw-perl/bin/iwperluse strict;use warnings;use TeamSite::Config;my $iwhome = TeamSite::Config::iwgethome(); # Get the iw-home from environmentif (open(TXT,">>$iwhome/local/unlocked.log")) { print TXT '=' x 70 . "\n"; print TXT "ARG: $_\n" foreach(@ARGV); print TXT "ENV: $_ => $ENV{$_}\n" foreach(sort(keys(%ENV))); close(TXT);}else { die " '$iwhome/local/unlocked.log' ($!)";}
ecoapp24-lgs: ls -al /etc/init.d/iw.local-rwxrwxr-x 4 root daemon 6596 Sep 29 2004 /etc/init.d/iw.localecoapp24-lgs: /etc/init.d/iw.local stopecoapp24-lgs: /etc/init.d/iw.local startecoapp24-lgs: ls -al /data/software/iw/iw-home/local/.pidstotal 4drwx------ 2 root root 512 Oct 17 10:44 .drwxrwxrwx 10 root daemon 1024 Oct 17 10:41 ..ecoapp24-lgs: tail -2f /apps/iwevents.log[Tue Oct 17 10:47:02 2006] kumarn35 editor Lock /default/main/bt/btw/portal/13_CR36383963/WORKAREA/content /templatedata/content/binary/datacapture.cfg 0x00001008453399f34000063e kumarn35[Tue Oct 17 10:47:07 2006] kumarn35 editor UnLock /default/main/bt/btw/portal/13_CR36383963/WORKAREA/content /templatedata/content/binary/datacapture.cfg 0x00001008453399f34000063e kumarn35ecoapp24-lgs: tail -10f /data/software/iw/iw-home/local/unlocked.logtail: cannot open input
here is the output when I run as kumarn35 on promptecoapp24-lgs: /data/software/iw/iw-home/iw-perl/bin/iwperl /data/software/iw/iw-home/local/unlocked.pl
here it isecoapp24-lgs: cat -vte /data/software/iw/iw-home/local/iwlocal.cfgiwatunlock^Ikumarn35^I/data/software/iw/iw-home/local/unlocked.plecoapp24-lgs: ls -al /data/software/iw/iw-home/localtotal 52drwxrwxrwx 10 root daemon 1024 Oct 17 16:02 .drwxrwxr-x 41 root bin 1024 Oct 14 09:58 ..