[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how to do something automatically at boot?



If I understand right you make a script like this one:

  rhino:/etc/init.d# cat /etc/init.d/weird-at
  #!/bin/sh

  set -e

  touch /tmp/goooo
  echo 'touch /tmp/greeber' | at now + 3 minutes
  touch /tmp/fgggggg

  exit 0
  rhino:/etc/init.d#

  rhino:/etc/init.d# ls -l weird-at
  -rwxr-xr-x 1 root root 110 2011-12-28 23:31 weird-at

Then make a link to it like this link:

  rhino:~# ls -l /etc/rc5.d/S98weird-at
  lrwxrwxrwx 1 root root 18 2011-12-28 12:48 /etc/rc5.d/S98weird-at ->
../init.d/weird-at
  rhino:~#

But this doesn't seem to work (/tmp/gooo and /tmp/fgggggg never show up,
and the at job isn't queued.  The script works fine  when run from the
command line.

Is there something I'm missing in this process?  Is there somewhere particular
to look for diagnostic output for things that are supposed to be done on boot?

Thanks,
Britton


Reply to: