From owner-freebsd-questions@FreeBSD.ORG Mon Dec 15 22:18:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30B801065676 for ; Mon, 15 Dec 2008 22:18:18 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id A1B7C8FC0C for ; Mon, 15 Dec 2008 22:18:17 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from smtp13.yandex.ru (smtp13.yandex.ru [77.88.32.83]) by forwards4.yandex.ru (Yandex) with ESMTP id B62E74C5541 for ; Tue, 16 Dec 2008 00:56:56 +0300 (MSK) Received: from 93-13-113-92.pool.ukrtel.net ([92.113.13.93]:45324 "EHLO HOMEUSER" smtp-auth: "kes-kes" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S5980274AbYLOV4o (ORCPT ); Tue, 16 Dec 2008 00:56:44 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp13 X-Yandex-TimeMark: 1229378204 X-BornDate: 1149541200 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 1 X-Comment: RFC 2476 MSA function at smtp13.yandex.ru logged sender identity as: kes-kes Date: Mon, 15 Dec 2008 23:56:43 +0200 From: KES X-Mailer: The Bat! (v4.0.24) Professional Organization: SaftTen X-Priority: 2 (High) Message-ID: <569944077.20081215235643@yandex.ru> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Subject: Startup scipt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: KES List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 22:18:18 -0000 Здравствуйте, Questions. It there feature (option in rc.subr) to run multiple services at once? For example I have 'service' to run service with specific flags I want to do: service_enable="YES" service_instances="instance1 instance2" service_instance1_flags="-flag 1 rl0" service_instance2_flags="-flag 2 rl2" so rc.subr will run: service -flag 1 rl0 service -flag 2 rl2 It will be great to have this feature that will do all dirty work to run multiple services. So maintainers of startup scripts will be free to not to do next things: for interface in ${arpwatch_interfaces}; do if [ ! -e "${arpwatch_dir}/arp.${interface}.dat" ]; then if [ -e "${arpwatch_dir}/arp.${interface}.dat-" ]; then cp "${arpwatch_dir}/arp.${interface}.dat-" "${arpwatch_dir}/arp.${interface}.dat" else touch "${arpwatch_dir}/arp.${interface}.dat" fi fi done EXAMPLES: ipguard_enable="YES" ipguard_instances="rl0 rl1 rl2" ipguard_rl0_interface="rl0" #NOTICE: this instance are runned without flags ipguard_rl1_interface="rl1" ipguard_rl1_flags="-r -b 100 -f /etc/ethers" ipguard_rl2_interface="rl2" ipguard_rl2_flags="-u 300 -xz" proftpd_enable="YES" proftpd_instances="external internal" proftpd_external_flags="-c external.conf" proftpd_internal_flags="-c ftp_for_localnet.conf" I do not know will be or not feature to on/off some instance: for example: ipguard_rl2_enable="NO" proftpd_external_enable="NO" By default all instances are enabled because of if user add second instance it has first one already runned. And he add second instance because of it is not enough to have only one instance. So proftpd_enable="YES" will enable all instances proftpd_enable="NO" will disable all instances proftpd_external_enable="NO" will disable some instance For example: user run three instances, but now want to disable one of them. So it write __enable="NO" What do you think about this improvement? -- С уважением, KES mailto:kes-kes@yandex.ru