#---------------------------------------------------------------------------- # /etc/rc.d/rc420.logip - log ip of wan-interface # # Creation: 2007-10-12 lanspezi # Last Update: $Id$ #---------------------------------------------------------------------------- if [ "$OPT_LOGIP" = yes ] then begin_script LOGIP "configure logip ..." if [ ! -f ${LOGIP_LOGDIR}/logip.log ] then log_error "WARNING: ${LOGIP_LOGDIR}/logip.log does not exist!" log_error "If this is your first boot with OPT_LOGIP enabled you can" log_error "ignore this message. Otherwise your logip-logfile is not" log_error "saved permanently. In this case you should read the docu again!" fi # check for writeable directory if [ -d ${LOGIP_LOGDIR} ] then if sh -c "> ${LOGIP_LOGDIR}/test.$$" 2> /dev/null then rm ${LOGIP_LOGDIR}/test.$$ logdir_ok=true else log_error "ERROR: cannot write to LOGIP_LOGDIR" fi else mkdir -p ${LOGIP_LOGDIR} if [ -d ${LOGIP_LOGDIR} ] then logdir_ok=true else log_error "ERROR: could not create directory for LOGIP" fi fi if [ "$logdir_ok" = "true" ] then echo "LOGIP_LOGDIR=$LOGIP_LOGDIR" > /var/run/logip.conf fi end_script fi