#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local setup commands in here:

NOLOG=0
if [ `grep -i "verbosity=0" /proc/cmdline|wc -l` -gt 0 ]; then
  NOLOG=1
fi
if [ `grep -i "verbosity=0" /etc/ping.conf|wc -l` -gt 0 ]; then
  NOLOG=1
fi

# Gain 20 MB in RAM...
#
if [ $NOLOG -eq 1 ]; then
  umount /initrd >/dev/null 2>&1
else
  umount /initrd
fi

# To avoid having kernel complain about no /lib/modules/etc.
# We don't compile any module anyway.
#
if [ ! -e /lib/modules ]; then
  mkdir /lib/modules
fi
if [ ! -e /lib/modules/`uname -r` ]; then
  mkdir /lib/modules/`uname -r`
fi
if [ ! -e /lib/modules/`uname -r`/modules.dep ]; then
  touch /lib/modules/`uname -r`/modules.dep
fi

# No power saving...
#
setterm -blank 0

# Launch syslog! oops.
#
/usr/sbin/syslogd >/dev/null 2>&1 &

# Launch PING
#
if [ $NOLOG -eq 1 ]; then
  /opt/PING/rc.ping 2>/dev/null
else
  /opt/PING/rc.ping
fi

