#!/bin/sh

debug=0

start()
{
  mount -o remount,rw /
  mount -t proc proc /proc
  mount -t sysfs sysfs /sys
  tr ' ' '\n' </proc/cmdline | grep -q '^debug$' && debug=1
  [ $debug -eq 0 ] && echo 1 >/proc/sys/kernel/printk
  hwclock --utc --hctosys
  return 0
}

stop()
{
  umount /sys
  umount /proc
}


RET=0
case "$1" in
  start)
    start
    RET=$?;;
  stop)
    stop
    RET=$?;;
  *)
    echo "Usage: $0 start|stop"
    RET=1
esac

exit $RET
