FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-28-2008, 11:40 AM
Arch Willingham
 
Default How to have script run after kernel changed

Is there any way to get a script to run automatically after the
computer reboots following a kernel change? For example, when yum runs and a
new kernel gets installed, I usually reboot and then run a script that enables
some devices that don’t work with a new kernel until the script has run. That’s
all fine and dandy for me to do but as I setup more and more users *with Fedora
(vs. windows), its an area that they find confusing and I’d like to keep
them out of the loop with respect to having to remember to run the script if the
kernel has changed.


*


Does that make sense?


*


Thanks!


*


Arch







--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 11:47 AM
Mogens Kjaer
 
Default How to have script run after kernel changed

Arch Willingham wrote:

Is there any way to get a script to run automatically after the
computer reboots following a kernel change? For example, when yum
runs and a new kernel gets installed, I usually reboot and then run a
script that enables some devices that don't work with a new kernel
until the script has run.


Add a script in /etc/init.d that tests if the device
works. If not, do what is necessary.

Mogens

--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 11:50 AM
Manuel Aróstegui
 
Default How to have script run after kernel changed

On Fri, 2008-03-28 at 08:40 -0400, Arch Willingham wrote:
> Is there any way to get a script to run automatically after the
> computer reboots following a kernel change? For example, when yum runs
> and a new kernel gets installed, I usually reboot and then run a
> script that enables some devices that don’t work with a new kernel
> until the script has run. That’s all fine and dandy for me to do but
> as I setup more and more users with Fedora (vs. windows), its an area
> that they find confusing and I’d like to keep them out of the loop
> with respect to having to remember to run the script if the kernel has
> changed.
>

Why /etc/rc.local doesn't do the trick?

Manuel.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 12:11 PM
Arch Willingham
 
Default How to have script run after kernel changed

Thanks to both of y'all. What's the difference between the two?

-----Original Message-----
From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Manuel Arstegui
Sent: Friday, March 28, 2008 8:51 AM
To: For users of Fedora
Subject: Re: How to have script run after kernel changed


On Fri, 2008-03-28 at 08:40 -0400, Arch Willingham wrote:
> Is there any way to get a script to run automatically after the
> computer reboots following a kernel change? For example, when yum runs
> and a new kernel gets installed, I usually reboot and then run a
> script that enables some devices that don't work with a new kernel
> until the script has run. That's all fine and dandy for me to do but
> as I setup more and more users with Fedora (vs. windows), its an area
> that they find confusing and I'd like to keep them out of the loop
> with respect to having to remember to run the script if the kernel has
> changed.
>

Why /etc/rc.local doesn't do the trick?

Manuel.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 12:23 PM
Manuel Arstegui
 
Default How to have script run after kernel changed

El vie, 28-03-2008 a las 09:11 -0400, Arch Willingham escribi:
> Thanks to both of y'all. What's the difference between the two?

Basically, the things in /etc/rc.local runs after all the things
in /etc/init.d are done.
Also, /etc/rc.local always runs, on the other hand if you have something
in /etc/init.d you have to make sure you did the "ln -s" to the rcX.d
where the X is the runlevel you're booting in.

Hope this helps.
Manuel.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 12:24 PM
Stuart Sears
 
Default How to have script run after kernel changed

Arch Willingham wrote:

Thanks to both of y'all. What's the difference between the two?


flexibility and complexity.

a script in /etc/rc.d/init.d can be configured (using chkconfig, mostly)
to run only in certain runlevels.


scripts you place here cshould be more complex as they have to support
start, stop, restart and status arguments


/etc/rc.d/rc.local is a script that runs once on bootup but only in
runlevels 2,3,4 or 5.


incidentally, you can also have a cron job that does this for you in
/etc/cron.d:


@reboot run_some_script_to_do_things.


Or for the more advanced user, create a metapackage that contains an
rpm trigger for when kernel packages get installed


regards,

Stuart
--
Stuart Sears RHCA etc.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-28-2008, 12:26 PM
Arch Willingham
 
Default How to have script run after kernel changed

Thanks Stuart and Manuel!

-----Original Message-----
From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Stuart Sears
Sent: Friday, March 28, 2008 9:25 AM
To: For users of Fedora
Subject: Re: How to have script run after kernel changed

Arch Willingham wrote:
> Thanks to both of y'all. What's the difference between the two?

flexibility and complexity.

a script in /etc/rc.d/init.d can be configured (using chkconfig, mostly)
to run only in certain runlevels.

scripts you place here cshould be more complex as they have to support
start, stop, restart and status arguments

/etc/rc.d/rc.local is a script that runs once on bootup but only in
runlevels 2,3,4 or 5.

incidentally, you can also have a cron job that does this for you in
/etc/cron.d:

@reboot run_some_script_to_do_things.


Or for the more advanced user, create a metapackage that contains an
rpm trigger for when kernel packages get installed

regards,

Stuart
--
Stuart Sears RHCA etc.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 02:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org