i want to run vtest.sh script when user shutdown his system
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Wed Jul 12 18:03:59 UTC 2006
yogesh at banasdairy.coop wrote:
> hi freind
> donot mind if ihave no enough idea about how to ask question
>
>
> i have one shell script /root/vtest.sh
>
> i want to run this script when user shutdown his/her system
>
> so where i place this file or what can i do
>
If you are talking about when they shut down the computer, then,
depending on what the script does, you may be able to move it to
/sbin/halt.local, or you can create a script for /etc/rc.d/init.d
that will be run on shutdown before the halt script. One thing to be
aware of is that when /sbin/halt.local is run, everything except the
root file system and the ramdisk is unmounted.
If you are talking about when a user logs out, then that is a
different matter, and depends on the shell or desktop used, and if
it is a CLI or GUI login.
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
More information about the fedora-list
mailing list