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

Kevin Kofler kevin.kofler at chello.at
Fri Jan 30 13:38:22 UTC 2009


I 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

Actually the su line should be:
su $user -c $i &

Otherwise users can DoS this script by having their ~/.rc.local script never
return.

        Kevin Kofler




More information about the fedora-list mailing list