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

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

 



Kevin Kofler wrote:
> 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

If you have SELinux enabled, won't these user scripts pick up the
wrong contexts and such?  I've got a few things in rc.local that I
start up for users and instead of su, I have something like this:

runcon user_u:system_r:unconfined_t -- runuser -l -c "$command" $user

Maybe that's overkill though? :)

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As long as people will accept crap, it will be financially profitable
to dispense it.
    -- Dick Cavett, in "Playboy", 1971

Attachment: pgpaITdnn9WYa.pgp
Description: PGP signature

-- 
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