summaryrefslogtreecommitdiffstats
path: root/share/examples/worm
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-06-23 16:34:44 +0000
committerjkh <jkh@FreeBSD.org>1996-06-23 16:34:44 +0000
commit0f3adf64a08e9a3b8caaf56647818e7411adba83 (patch)
tree0aab9e685e40a71a105c7d4745b6c30849396c8c /share/examples/worm
parente8882fb4110f338f2541ab2cbb8c41e5aea2d091 (diff)
downloadFreeBSD-src-0f3adf64a08e9a3b8caaf56647818e7411adba83.zip
FreeBSD-src-0f3adf64a08e9a3b8caaf56647818e7411adba83.tar.gz
Add some examples on burning CDRs - I figured it was about time to
document it! :-)
Diffstat (limited to 'share/examples/worm')
-rw-r--r--share/examples/worm/README12
-rwxr-xr-xshare/examples/worm/burncd.sh41
-rwxr-xr-xshare/examples/worm/makecdfs.sh20
3 files changed, 73 insertions, 0 deletions
diff --git a/share/examples/worm/README b/share/examples/worm/README
new file mode 100644
index 0000000..ad69106
--- /dev/null
+++ b/share/examples/worm/README
@@ -0,0 +1,12 @@
+These two shell scripts are what the developers use to burn CDs,
+including the FreeBSD releases made for Walnut Creek CDROM.
+
+makecdfs.sh is used to turn an arbitrary tree of files into a single
+ISO9660 (with RockRidge extensions) filesystem image. See the top
+of the shell script for usage instructions.
+
+burncd.sh takes the filesystem image produced by makecdfs.sh and burns
+it onto an HP 4020i CDR drive (see script for information on customizing
+it to other types of CDR drives).
+
+It's that simple!
diff --git a/share/examples/worm/burncd.sh b/share/examples/worm/burncd.sh
new file mode 100755
index 0000000..3f16652
--- /dev/null
+++ b/share/examples/worm/burncd.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# usage: burncd input-file
+#
+# Note: This is set up to work ONLY on the HP 4020i CDR drive!
+# See the man page for wormcontrol(1) and change the wormcontrol commands
+# to match your drive, if the man page lists it as supported.
+#
+# This script also requires the usage of team(1), an optional component from
+# the FreeBSD ports collection.
+
+if ! pkg_info -e team-3.1; then
+ echo "$0: You do not appear to have the team package installed."
+ echo
+ echo "Please see /usr/ports/misc/team-3.1 if you have the ports"
+ echo "collection on your machine, or install the team package from"
+ echo "your CD or the net. To install team from the net right now,"
+ echo "simply type:"
+ echo
+ echo "pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/packages/All/team-3.1.tgz"
+ echo
+ echo "when logged in (or su'd to) root."
+ exit 1
+fi
+
+if [ $# -lt 1 ]; then
+ echo "usage: $0 input-file"
+elif [ ! -f $1 ]; then
+ echo "$0: $1 is not a valid file."
+elif [ "`id -u`" != "0" ]; then
+ echo "Sorry, this must be done as root."
+else
+ echo -n "Place CD in the worm drive now and press return: "
+ read junk
+ scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" >/dev/null 2>&1
+ wormcontrol select HP 4020i
+ wormcontrol prepdisk double
+ wormcontrol track data
+ rtprio 5 team -v 1m 5 < $1 | dd of=/dev/rworm0 obs=20k
+ wormcontrol fixate 1
+fi
diff --git a/share/examples/worm/makecdfs.sh b/share/examples/worm/makecdfs.sh
new file mode 100755
index 0000000..f8315f2
--- /dev/null
+++ b/share/examples/worm/makecdfs.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# usage: makecdfs "cd title" input-tree output-file "copyright string"
+#
+# For example:
+#
+# makecdfs FreeBSD-2.1.5 /a/cdrom-dist /a/cdimage.cd0 "Walnut Creek CDROM \
+# 1-510-674-0783 FAX 1-510-674-0821"
+
+if [ $# -lt 4 ]; then
+ echo "usage: $0 \"cd-title\" input-tree output-file \"copyright\""
+elif [ ! -d $2 ]; then
+ echo "$0: $2 is not a directory tree."
+else
+ title="$1"; shift
+ tree=$1; shift
+ outfile=$1; shift
+ copyright="$1"
+ mkisofs -a -d -N -D -R -T -V "$title" -P "$copyright" -o $outfile $tree
+fi
OpenPOWER on IntegriCloud