Re: unable to start rc-local.service

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

 





On 09/03/2016 08:41 PM, Kevin Cummings wrote:
On 09/03/16 16:59, François Patte wrote:
Bonsoir,

I try to enable rc-local service:

1- I created /etc/rc.d/rc.local file:

#!/bin/bash

iptables -I INPUT -p udp --sport 1900 -j ACCEPT

2- I chmoded  /etc/rc.d/rc.local

chmod u+x /etc/rc.d/rc.local
Is the file owned by root.root?

On one of my systems:

# ls -l /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 505 Aug 18 23:31 /etc/rc.d/rc.local
Does it  not need to have logic to differentiate between
start and stop ala

#!/bin/bash

case $1 in
start)  start some stuff and save exit_code
        ;;
stop)
    stop some stuff and save exit_code
        ;;
*)    issue some error message and set exit_code to 1
esac

exit $exit_code

-jd
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux