Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
>[tnayrbleinad@ga-cmng-cuda2-c1a-a-141 tnayrbleinad]$
That's no kind of code: that's just your prompt. Rather a long one, due to the long username and hostname.
.sh files are to be executed by first doing "chmod +x <filename>" and then "./<filename>"
I wanted to get my firewall script(shellscript) to run at bootup. I stuck in this file like this. Did I do this the right way. my question is putting a sh in front of the file anothr way to run a shellscript
Code:
# /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $
# This is a good place to load any misc.
# programs on startup ( 1>&2 )
sh /etc/rc.firewall
Yes, that's fine. On most linux systems, sh gets you /bin/sh, which is a symlink to /bin/bash. So what you're doing there is invoking bash, and passing it a script. The same thing happens if you make the file executable and run it, due to the magic "#!/bin/bash" that you'll find at the top of most shell scripts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.