1#!/bin/sh 2 3# This script can be used to install packages from the 4# the installation CD-ROM. 5 6RC=/usr/etc/rc.package 7CDMP=/mnt 8CDPACK=${CDMP}/install/packages 9PACKSUM=pkg_summary.bz2 10cdpackages="" 11cdmounted="" 12 13if [ -f "$RC" ] 14then . "$RC" 15fi 16 17# Is there a usable CD to install packages from? 18if [ -n "$cddrive" ] 19then pack=${cddrive}p2 20 umount $pack >/dev/null 2>&1 || true 21 echo "Checking for CD in $pack." 22 if mount -r $pack $CDMP 2>/dev/null 23 then fn="$CDPACK/$PACKSUM" 24 echo "Found." 25 cdmounted=1 26 cdpackages=$fn 27 if [ ! -f $cdpackages ] 28 then cdpackages="" 29 echo "No package summary found on CD in $fn." 30 exit 1 31 fi 32 else echo "Not found." 33 exit 1 34 fi 35else echo "Don't know where the install CD is. You can set it in $RC." 36 exit 1 37fi 38 39# Set package repo to CD and populate package db 40export PKG_REPOS=${CDPACK} 41pkgin update 42 43# Run pkgin 44pkgin $@ 45