Re: Service to run user-owned init scripts at boot time?

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

 



On Fri, 30 Jan 2009 06:18:20 +0100
Kevin Kofler <kevin.kofler@xxxxxxxxx> wrote:

> Christian Kreibich wrote:
> > I am looking for a service that lets regular users place scripts in
> > a well defined location, say somewhere in their home directory, so
> > that those scripts will be executed with the respective user's
> > permissions at system boot time (note, I don't mean user login
> > time). I was wondering whether Fedora provides a package that'll
> > provide this so I don't have to set up a solution myself. Thanks...
> 
> This should work:
> 
> cat >>/etc/rc.d/rc.local <<EOF
> for i in /home/*/.rc.local ; do
>   user=${i#/home/}
>   user=${user%/.rc.local}
>   su $user -c $i
> done
> EOF
> 
>         Kevin Kofler
> 

This should work as long as all the prerequisite services have been
started, such as mounting the file system.  One other requirement
is all users accounts are in /home.

-pete


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux