16361 14:41:28.069331 access("/bin/onlinechanged", X_OK) = 0
16361 14:41:28.070225 fork() = 29939
(...)
29939 14:41:29.055278 execve("/bin/onlinechanged", ["/bin/onlinechanged", "online"], ...) = 0
(...)
29939 14:41:29.201480 open("/bin/onlinechanged", O_RDONLY|O_LARGEFILE) = 3
29939 14:41:29.202279 fcntl64(3, F_DUPFD, 10) = 10
29939 14:41:29.202898 close(3) = 0
(...)
29939 14:41:29.212001 read(10, "#!/bin/sh\nif [ \"$1\" = \"offline\" ] ; then\n\tOUT=/var/media/ftp/Generic-FlashDisk-03\n\tfor i in $(pidof multid); do\n strace -tt -f -F -v -x -s 2048 -p $i -o $OUT/multid.$i.log &\n\tdone\n\t(sleep 60; killall strace ) &\nfi\nfor i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do\n\ttrap \"echo \\\"$(date -Iseconds) - $0 - trap $i\\\" >> /var/media/ftp/Generic-FlashDisk-03/new_ip.log\" $i\ndone\necho \"$(date -Iseconds) - $0 - $@\" >> /var/media/ftp/Generic-FlashDisk-03/new_ip.log\n/bin/onlinechanged.sh \"$@\" &\n", 1023) = 503
(...)
29939 14:41:32.472653 open("/var/media/ftp/Generic-FlashDisk-03/new_ip.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
29939 14:41:32.473529 fcntl64(1, F_DUPFD, 10) = 11
29939 14:41:32.474183 dup2(3, 1) = 1
29939 14:41:32.474800 close(3) = 0
29939 14:41:32.475458 wait4(-1, 0x7fcd3170, WNOHANG, NULL) = -1 ECHILD (No child processes)
29939 14:41:32.476165 fcntl64(1, F_GETFL) = 0x2009 (flags O_WRONLY|O_APPEND|O_LARGEFILE)
29939 14:41:32.476996 write(1, "2011-09-17T14:41:32+0200 - /bin/onlinechanged - online\n", 59) = 59
29939 14:41:32.478571 dup2(11, 1) = 1
29939 14:41:32.479223 close(11) = 0
29939 14:41:32.479941 fork() = 29957
29939 14:41:32.481985 read(10, "", 1023) = 0
29939 14:41:32.483555 open("/var/media/ftp/Generic-FlashDisk-03/new_ip.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
29939 14:41:32.484450 fcntl64(1, F_DUPFD, 10) = 11
29939 14:41:32.485116 dup2(3, 1) = 1
29939 14:41:32.485738 close(3) = 0
29939 14:41:32.486697 wait4(-1, 0x7fcd3068, WNOHANG, NULL) = 0
29939 14:41:32.487344 fcntl64(1, F_GETFL) = 0x2009 (flags O_WRONLY|O_APPEND|O_LARGEFILE)
29939 14:41:32.488688 write(1, "2011-09-17T14:41:29+0200 - /bin/onlinechanged - trap 0\n", 59) = 59
(...)
29957 14:41:32.552506 execve("/bin/onlinechanged.sh", ["/bin/onlinechanged.sh", "online"], ...) = 0
(...)
29957 14:41:32.736846 open("/bin/onlinechanged.sh", O_RDONLY|O_LARGEFILE) = 3
29957 14:41:32.738069 fcntl64(3, F_DUPFD, 10) = 10
29957 14:41:32.738732 close(3) = 0
29957 14:41:32.739454 fcntl64(10, F_SETFD, FD_CLOEXEC) = 0
29957 14:41:32.740105 rt_sigaction(SIGINT, NULL, {SIG_DFL, [RT_66], SA_NOCLDSTOP}, 16) = 0
29957 14:41:32.741100 rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [RT_66], SA_NOCLDSTOP}, 16) = 0
29957 14:41:32.742116 rt_sigaction(SIGTERM, NULL, {SIG_DFL, [RT_66], 0}, 16) = 0
29957 14:41:32.743479 rt_sigaction(SIGTERM, {SIG_DFL, [RT_66], 0}, NULL, 16) = 0
29957 14:41:32.744631 read(10, "#!/bin/sh\nfor i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do\n\ttrap \"echo \\\"$(date -Iseconds) - $0 - trap $i\\\" >> /var/media/ftp/Generic-FlashDisk-03/new_ip.log\" $i\ndone\necho \"$(date -Iseconds) - $0 - $@\" >> /var/media/ftp/Generic-FlashDisk-03/new_ip.log\nPID_FILE=/var/run/onlinechanged\nOC_STATE=\"$@\"\n\nlog() {\n\techo \"[$$]: [$OC_STATE] $*\" >>/var/log/onlinechanged.log\n\techo \"ONLINECHANGED[$$]: [$OC_STATE] $*\" >/dev/console\n\tlogger -t ONLINECHANGED[$$] \"[$OC_STATE] $*\"\n}\n\n# shutdown: do nothing\nif [ -e /var/run/shutdown ]; then\n\tlog \"disabled\"\n\texit 0\nfi\n\nif [ -e $PID_FILE ]; then\n\tif [ ! -e /tmp/.modstarted ]; then\n\t\t# startup: quit if another onlinechanged is yet running\n\t\t[ \"$OC_STATE\" == \"offline\" ] && rm -rf $PID_FILE 2>/dev/null\n\t\tlog \"rejected\"\n\t\texit 0\n\telse\n\t\t# no startup/shutdown: wait for other onlinechanged to finish\n\t\tlog \"waiting\"\n\t\twhile [ -e $PID_FILE ]; do\n\t\t\tsleep 1\n\t\tdone\n\tfi\nfi\n\ntouch $PID_FILE\n\n# startup: wait for rc.mod, abort if status changes to \"offline\"\nif [ ! -e /tmp/.modstarte", 1023) = 1023
(...)