Detecting System Restart or Shutdown?

Steve Flynn anothermindbomb at gmail.com
Sat Apr 16 09:18:06 UTC 2011


On Thu, Apr 14, 2011 at 12:13 PM, waqar afridi <afridi.waqar at gmail.com>wrote:

>
> Now the Problem is when the System Restarts, the PCR resets, so Should be
> the Contents of File, an easy way is to delete the File, create new one.
>

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.


-- 
Steve

When one person suffers from a delusion it is insanity. When many people
suffer from a delusion it is called religion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110416/213c770e/attachment.html>


More information about the ubuntu-users mailing list