From owner-freebsd-questions@FreeBSD.ORG Mon Sep 20 23:23:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4086F16A4CE for ; Mon, 20 Sep 2004 23:23:49 +0000 (GMT) Received: from colossus.systems.pipex.net (colossus.systems.pipex.net [62.241.160.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61ED643D45 for ; Mon, 20 Sep 2004 23:23:48 +0000 (GMT) (envelope-from mark.cullen@dsl.pipex.com) Received: from laptop (81-178-91-21.dsl.pipex.com [81.178.91.21]) by colossus.systems.pipex.net (Postfix) with SMTP id 083251C00111 for ; Tue, 21 Sep 2004 00:23:45 +0100 (BST) Message-ID: <01bb01c49f69$48c66300$f800000a@laptop> From: "Markie" To: Date: Tue, 21 Sep 2004 00:26:38 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: reload rc.conf during boot process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 23:23:49 -0000 Is it possible to do this somehow? I was trying my hand out at C and made a cool little menu for myself. It looks for files in /etc/ which are named rc.conf.xxxxx and lists them in the menu. Then, when you select one on boot, it copies the selected configuration file to rc.conf. I put my program in... the rc.d mount script, so that the disk is mounted writeable at the time and my C program is able to issue cp (bad way I know) to replace rc.conf. After running my program in the rc.d mount script I then did a . /etc/rc.conf but rc.conf doesn't get reloaded. The file is being copied over, as when I reboot it starts using the copied over configuration. I am not sure if . /etc/rc.conf is supposed to load a file in? I just saw it in some other script and assumed that's what it was doing. Thanks in advance