summaryrefslogtreecommitdiff
path: root/security/super/files/sample.cdmount
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1998-11-19 09:19:19 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1998-11-19 09:19:19 +0000
commitd02eecccd268a8c846c9c94b67bbfcf63dc0ffc5 (patch)
tree58aa1aa302519d50dcbd5366f17d606d36e627ae /security/super/files/sample.cdmount
parentOops, tried to use a variable before defining it. (diff)
Update to version 3.11.6.
(currently the "password=y" feature to requre a password to be entered before running a command only works on DES passwords)
Notes
Notes: svn path=/head/; revision=14678
Diffstat (limited to 'security/super/files/sample.cdmount')
-rw-r--r--security/super/files/sample.cdmount38
1 files changed, 38 insertions, 0 deletions
diff --git a/security/super/files/sample.cdmount b/security/super/files/sample.cdmount
new file mode 100644
index 000000000000..09ccb4f5842d
--- /dev/null
+++ b/security/super/files/sample.cdmount
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+prog=`basename $0`
+# If script invoked w/o super, then exec super to run this script.
+test "X$SUPERCMD" = "X$prog" || exec /usr/local/bin/super $prog ${1+"$@"}
+
+usage() {
+cat <<-END
+ Use:
+ $prog hsfs | 4.2
+
+ Purpose:
+ Mounts a cdrom on /cdrom.
+
+ Argument: the cdrom type; specify one of
+ hsfs - cdrom is High Sierra File System
+ 4.2 - usual Unix disk format
+
+END
+}
+
+case $# in
+ 1 ) ;;
+ * ) usage ; exit 1 ;;
+esac
+
+type="$1"
+case "$type" in
+ 4.2 | hsfs ) ;;
+ -h ) usage ; exit 0 ;;
+ * ) echo "$prog: unknown cd type $1" ; usage ; exit 1 ;;
+esac
+
+PATH=$PATH:/usr/etc # SunOS 4.x needs this to understand type hsfs
+export PATH
+
+echo /etc/mount -v -r -t $type -o nosuid /dev/sr0 /cdrom
+ /etc/mount -v -r -t $type -o nosuid /dev/sr0 /cdrom