Detecting System Restart or Shutdown?

Fajar Priyanto fajarpri at arinet.org
Sat Apr 16 12:00:22 UTC 2011


On Sat, Apr 16, 2011 at 5:18 PM, Steve Flynn <anothermindbomb at gmail.com> wrote:
> I'm still struggling to work out why
> cat /dev/null > "your_file"
> in an init script won't do exactly what you require.
> I presume your utility appends to an existing file, so emptying the file as
> the machine comes up from a reboot would do precisely what you want to
> achieve without messing around with timestamps and 'last reboot' parsing.

+1 from me.
This is the simplest way.




More information about the ubuntu-users mailing list