On 1/4/2012 4:04 AM, JB wrote:
Paul Allen Newell<pnewell<at> cs.cmu.edu> writes:
Sleep well, the polarity is still intact :-)
Would the following be helpful ?
# ls -l /etc/init.d/network
-rwxr-xr-x. 1 root root 7448 Feb 25 2011 /etc/init.d/network
# file /etc/init.d/network
/etc/init.d/network: Bourne-Again shell script text executable
# cat /etc/init.d/network
#! /bin/bash
#
# network Bring up/down networking
#
# chkconfig: - 10 90
# description: Activates/Deactivates all network interfaces configured to \
# start at boot time.
#
### BEGIN INIT INFO
# Provides: $network
# Should-Start: iptables ip6tables
# Short-Description: Bring up/down networking
# Description: Bring up/down networking
### END INIT INFO
# Source function library.
. /etc/init.d/functions
...
# /etc/init.d/network status
Configured devices:
lo
Currently active devices:
lo eth0
# sh /etc/init.d/network status
Configured devices:
lo
Currently active devices:
lo eth0
# chmod a-x /etc/init.d/network
# ls -al /etc/init.d/network
-rw-r--r--. 1 root root 7448 Feb 25 2011 /etc/init.d/network
# file /etc/init.d/network
/etc/init.d/network: Bourne-Again shell script text executable
# /etc/init.d/network status
bash: /etc/init.d/network: Permission denied
# sh /etc/init.d/network status
Configured devices:
lo
Currently active devices:
lo eth0
JB
JB:
Yes, helpful. I never really learned shell programming, sort of just
picked up what I needed on an ad hoc base as I live in C++. So I always
stumble when trying to do the simpliest of things. The issue of sh *.sh
versus *.sh (with #! inside) is something I am only aware of through a
scream "and why isn't this working?" followed by cut-and-pasting
something that is working and hacking it up with knowing why.
Thanks,
Paul
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org