+ do not hard code where a port may be installed to

+ uses `mkisofs' rather than `mkhybrid' as the new mkisofs is the merger
  of the two
+ checks for `setcdboot's existsance and tries to pkg_add it if needed
+ removes English contraction

Approved by:	jkh
This commit is contained in:
David E. O'Brien 2001-08-20 21:22:33 +00:00
parent 729956024e
commit 9c2ee3164b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81997
3 changed files with 22 additions and 9 deletions

View File

@ -33,10 +33,11 @@ if [ $# -lt 3 ]; then
exit 1 exit 1
fi fi
if [ ! -x /usr/local/bin/mkhybrid ]; then type mkisofs 2>&1 | grep " is " >/dev/null
if [ $? -eq 0 ]; then
echo The mkisofs port is not installed. Trying to get it now. echo The mkisofs port is not installed. Trying to get it now.
if ! pkg_add -r mkisofs; then if ! pkg_add -r mkisofs; then
echo "Couldn't get it via pkg_add - please go install this" echo "Could not get it via pkg_add - please go install this"
echo "from the ports collection and run this script again." echo "from the ports collection and run this script again."
exit 2 exit 2
fi fi
@ -45,7 +46,17 @@ fi
LABEL=$1; shift LABEL=$1; shift
NAME=$1; shift NAME=$1; shift
mkhybrid -r -J -h -V $LABEL -o $NAME $* mkisofs -r -J -h -V $LABEL -o $NAME $*
type setcdboot 2>&1 | grep " is " >/dev/null
if [ $? -eq 0 ]; then
echo The setcdboot port is not installed. Trying to get it now.
if ! pkg_add -r setcdboot; then
echo "Could not get it via pkg_add - please go install this"
echo "from the ports collection and run this script again."
exit 2
fi
fi
if [ "x$bootable" != "x" ]; then if [ "x$bootable" != "x" ]; then
setcdboot $NAME /boot/cdboot setcdboot $NAME /boot/cdboot
fi fi

View File

@ -36,10 +36,11 @@ if [ $# -lt 3 ]; then
exit 1 exit 1
fi fi
if [ ! -x /usr/local/bin/mkhybrid ]; then type mkisofs 2>&1 | grep " is " >/dev/null
if [ $? -eq 0 ]; then
echo The mkisofs port is not installed. Trying to get it now. echo The mkisofs port is not installed. Trying to get it now.
if ! pkg_add -r mkisofs; then if ! pkg_add -r mkisofs; then
echo "Couldn't get it via pkg_add - please go install this" echo "Could not get it via pkg_add - please go install this"
echo "from the ports collection and run this script again." echo "from the ports collection and run this script again."
exit 2 exit 2
fi fi
@ -48,4 +49,4 @@ fi
LABEL=$1; shift LABEL=$1; shift
NAME=$1; shift NAME=$1; shift
mkhybrid $bootable -r -J -h -V $LABEL -o $NAME $* mkisofs $bootable -r -J -h -V $LABEL -o $NAME $*

View File

@ -36,10 +36,11 @@ if [ $# -lt 3 ]; then
exit 1 exit 1
fi fi
if [ ! -x /usr/local/bin/mkhybrid ]; then type mkisofs 2>&1 | grep " is " >/dev/null
if [ $? -eq 0 ]; then
echo The mkisofs port is not installed. Trying to get it now. echo The mkisofs port is not installed. Trying to get it now.
if ! pkg_add -r mkisofs; then if ! pkg_add -r mkisofs; then
echo "Couldn't get it via pkg_add - please go install this" echo "Could not get it via pkg_add - please go install this"
echo "from the ports collection and run this script again." echo "from the ports collection and run this script again."
exit 2 exit 2
fi fi
@ -48,4 +49,4 @@ fi
LABEL=$1; shift LABEL=$1; shift
NAME=$1; shift NAME=$1; shift
mkhybrid $bootable -r -J -h -V $LABEL -o $NAME $* mkisofs $bootable -r -J -h -V $LABEL -o $NAME $*