Changeset 856
- Timestamp:
- 25/05/09 17:18:50 (4 years ago)
- Location:
- trunk/fon/fonstate
- Files:
-
- 3 modified
-
files/etc/init.d/fonstate (modified) (1 diff)
-
src/Makefile (modified) (2 diffs)
-
src/lib/log.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fon/fonstate/files/etc/init.d/fonstate
r1 r856 1 1 #!/bin/sh /etc/rc.common 2 2 3 START= 703 START=96 4 4 5 5 start() { -
trunk/fon/fonstate/src/Makefile
r841 r856 7 7 OBJS=main.o lib/log.o lib/uci.o lib/sys.o fon/state.o net/socket.o plugin/plugin.o lib/signal.o net/net_helper.o lib/ps.o 8 8 9 all: $(PROGS) fonstate_ online.so fonstate_chilli.so9 all: $(PROGS) fonstate_chilli.so 10 10 11 11 $(PROGS): $(OBJS) … … 15 15 # $(CC) $(CFLAGS) -o $@ $^ -shared 16 16 17 fonstate_online.so: plugin/online.c18 $(CC) $(CFLAGS) -o $@ $^ -shared17 #fonstate_online.so: plugin/online.c 18 # $(CC) $(CFLAGS) -o $@ $^ -shared 19 19 20 20 fonstate_chilli.so: plugin/chilli.c -
trunk/fon/fonstate/src/lib/log.c
r1 r856 23 23 24 24 extern int daemonize; 25 int log_open = 0; 26 27 void start_log(void) 28 { 29 if(log_open) 30 return; 31 openlog("fonstated", 0, 0); 32 } 25 33 26 34 void log_printf(char *fmt, ...) … … 34 42 35 43 if(daemonize) 44 { 36 45 syslog(10, p); 37 else 46 start_log(); 47 } else { 38 48 printf(p); 49 } 39 50 }
