Loading ...
Sorry, an error occurred while loading the content.

Question about SYSLOG

Expand Messages
  • bloedmann999
    Hi, I am running Unslung V5.5 and have a Maxtor OneTouch USB drive that does happen to spin down OK when not in use. To do that I have /dev and /var on a
    Message 1 of 1 , Dec 3, 2006
    View Source
    • 0 Attachment
      Hi,
      I am running Unslung V5.5 and have a Maxtor OneTouch USB drive that
      does happen to spin down OK when not in use. To do that I have /dev
      and /var on a RAMFS. The script to do this is one I got from the
      Unslung Wiki site. One thing does not work correctly though, when
      /var/log/messages is copied over to the RAMFS I lose syslog messages
      for a while, so I always seem to have a gap in them.

      This is the last line in SYSLOG before the gap:

      /sbin/logger "/unslung/rc.bootbin Mount /dev"


      Is there any way to avoid this gap?

      Here is my script (with lots of Logger lines to help me understand
      what was going on):

      #!/bin/sh

      #set -x

      /sbin/logger "/unslung/rc.bootbin Started"

      /sbin/logger "/unslung/rc.bootbin Creating ramfs for /dev:"
      /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=128

      /sbin/logger "/unslung/rc.bootbin Copying /dev"
      /bin/cp -rp /dev/* /mnt/tmpmnt/

      /sbin/logger "/unslung/rc.bootbin Mkdir /dev.state"
      /bin/mkdir -p /dev.state

      /sbin/logger "/unslung/rc.bootbin Mount /dev.state"
      /bin/mount -o bind /dev /dev.state

      /sbin/logger "/unslung/rc.bootbin Mount /dev"
      /bin/mount -o bind /mnt/tmpmnt /dev


      /sbin/logger "/unslung/rc.bootbin Creating ramfs for /var:"
      /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256

      /sbin/logger "/unslung/rc.bootbin Copying /var"
      /bin/cp -rp /var/* /mnt/tmpmnt/

      /sbin/logger "/unslung/rc.bootbin Mkdir /var.state"
      /bin/mkdir -p /var.state

      /sbin/logger "/unslung/rc.bootbin Mount /var.state"
      /bin/mount -o bind /var /var.state

      /sbin/logger "/unslung/rc.bootbin Mount /var"
      /bin/mount -o bind /mnt/tmpmnt /var

      /sbin/logger "/unslung/rc.bootbin Cleanup /var.state/log/"
      rm /var.state/log/*

      /sbin/logger "/unslung/rc.bootbin Done"

      # return and continue execution of system.rc
      return 1





      Cheers Brian
    Your message has been successfully submitted and would be delivered to recipients shortly.