From owner-freebsd-ports Sat Jul 18 12:32:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA18736 for freebsd-ports-outgoing; Sat, 18 Jul 1998 12:32:26 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from a486n1.znh.org (dialup3.gaffaneys.com [208.155.161.53]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA18731 for ; Sat, 18 Jul 1998 12:32:19 -0700 (PDT) (envelope-from zach@gaffaneys.com) Received: (from zach@localhost) by a486n1.znh.org (8.8.8/8.8.8) id OAA06196; Sat, 18 Jul 1998 14:34:34 -0500 (CDT) (envelope-from zach) Message-ID: <19980718143433.A6040@znh.org.> Date: Sat, 18 Jul 1998 14:34:33 -0500 From: Zach Heilig To: Sue Blake , Chuck Robey Cc: freebsd-ports@FreeBSD.ORG Subject: Re: questions about packages References: <19980718171423.58388@welearn.com.au> <19980719001610.45098@welearn.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19980719001610.45098@welearn.com.au>; from Sue Blake on Sun, Jul 19, 1998 at 12:16:10AM +1000 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, Jul 19, 1998 at 12:16:10AM +1000, Sue Blake wrote: > Well, I'm creating, not installing, and the people who will be > installing won't be investigating those things. They'll be taking ten > minutes to find the right keys to type in 'pkg_add filename' correctly, > and have neither the knowledge nor enthusiasm to investigate further. > *After* the package is installed they will have the means to *begin* to > learn these things. Meanwhile, I have to make sure I know damn well how > that package works in order to give them some chance of success with > no prior knowledge and the minimum of keystrokes. This sounds like you want a script to check and possibly install these packages, rather than relying on pkg_add directly. It could be as simple as: #!/bin/sh if [ .$1 = . ]; then echo "Please specify the path to the installation CDROM" exit 1 fi pkg_add $1/package if [ $? -ne 0 ]; then echo "Warning: Installation of package failed" fi ... If the packages are spread among multiple CDROM's, the error condition could prompt to mount a different CDROM (but that starts to get ugly). With some creative uses of dmesg, grep, and mount, you could figure out the device name of any cdroms, and where (or if) they are mounted. -- Zach Heilig -- zach@gaffaneys.com Real Programs don't use shared text. Otherwise, how can they use functions for scratch space after they are finished calling them? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message