From 896ffe1c65f28b058d6306d6ebe286016dde2ecd Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 29 Dec 2005 20:48:01 +0000 Subject: [PATCH] Do not require a .sh extension for scripts in local_startup dirs, e.g. /usr/local/etc/rc.d, /usr/pkg/etc/rc.d. Just assume that all executable files in said directories are scripts. This will allow pkgsrc and ports packages which install RC scripts to operate. Brought-up-by: Cheese Lottery (and many others over the years). --- etc/rc.d/localdaemons | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/rc.d/localdaemons b/etc/rc.d/localdaemons index 19e33375f1..d0f8f023b4 100644 --- a/etc/rc.d/localdaemons +++ b/etc/rc.d/localdaemons @@ -1,7 +1,7 @@ #!/bin/sh # # $FreeBSD: src/etc/rc.d/localdaemons,v 1.2 2003/05/05 15:38:41 mtm Exp $ -# $DragonFly: src/etc/rc.d/localdaemons,v 1.3 2005/11/19 21:47:32 swildner Exp $ +# $DragonFly: src/etc/rc.d/localdaemons,v 1.4 2005/12/29 20:48:01 dillon Exp $ # # PROVIDE: localdaemons @@ -17,7 +17,7 @@ stop_cmd="locald_stop" locald_start() { - # For each dir in $local_startup, search for init scripts matching *.sh + # For each dir in $local_startup, search for init scripts matching * # case ${local_startup} in [Nn][Oo] | '') @@ -30,7 +30,7 @@ locald_start() fi for dir in ${local_startup}; do if [ -d "${dir}" ]; then - for script in ${dir}/*.sh; do + for script in ${dir}/*; do slist="${slist}${script_name_sep}${script}" done fi @@ -56,7 +56,7 @@ locald_stop() { echo -n 'Shutting down daemon processes:' - # For each dir in $local_startup, search for init scripts matching *.sh + # For each dir in $local_startup, search for init scripts matching * case ${local_startup} in [Nn][Oo] | '') ;; @@ -67,7 +67,7 @@ locald_stop() fi for dir in ${local_startup}; do if [ -d "${dir}" ]; then - for script in ${dir}/*.sh; do + for script in ${dir}/*; do slist="${slist}${script_name_sep}${script}" done fi -- 2.41.0