Date: Mon, 30 Oct 2000 09:06:49 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Jeremy Vandenhouten <jeremy.vandenhouten@marquette.edu> Cc: questions@freebsd.org Subject: Re: Automated Scripts Message-ID: <20001030090649.U22110@fw.wintelcom.net> In-Reply-To: <e9e34eb6f3.eb6f3e9e34@marquette.edu>; from jeremy.vandenhouten@marquette.edu on Mon, Oct 30, 2000 at 11:04:06AM -0600 References: <e9e34eb6f3.eb6f3e9e34@marquette.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
* Jeremy Vandenhouten <jeremy.vandenhouten@marquette.edu> [001030 09:04] wrote: > > > > the file, is it possible to put perl scripts into rc.d as well? > > > > It _looks_ possible: > > > > case ${local_startup} in > > [Nn][Oo] | '') > > ;; > > *) > > echo -n 'Local package initialization:' > > for dir in ${local_startup}; do > > if [ -d "${dir}" ]; then > > for script in ${dir}/*.sh; do > > if [ -x "${script}" ]; then > > (set -T > > trap 'exit 1' 2 > > ${script} start) > > fi > > done > > fi > > done > > echo . > > ;; > > > > Given this line right here: > > for script in ${dir}/*.sh; do > > It looks like all you would have to do is add another identical for > loop and add something similar... For instance if all your perl scripts > ended in .pl... Well you don't need them to end with .pl, having the perl interpreter magic is sufficient, you can name a perl script foo.sh as long as you have the interpreter line set. If you wanted to you could make a .sh that was a /bin/sh script that would just run a .pl that's in /usr/local/etc/rc.d/something.pl. > > for script in ${dir}/*.pl; do > > Yes, yes I know that is supposed to be for older perl libraries but in > this case... > > Just one question, where did this snippet come from? /etc/rc :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001030090649.U22110>