File: 04-Examples.patch

package info (click to toggle)
super 3.30.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,860 kB
  • sloc: ansic: 24,673; sh: 297; makefile: 296
file content (123 lines) | stat: -rw-r--r-- 3,527 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
From: Robert Luberda <robert@debian.org>
Date: Mon, 4 Jun 2001 21:00:00 +0200
Subject: 04 Examples.

Update paths in examples.
---
 sample.cdmount  | 29 +++++++++++++----------------
 sample.cdumount | 12 ++++++------
 sample.tab      |  5 +++--
 3 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/sample.cdmount b/sample.cdmount
index 09ccb4f..d5d88f0 100644
--- a/sample.cdmount
+++ b/sample.cdmount
@@ -2,37 +2,34 @@
 
 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+"$@"}
+test "X$SUPERCMD" = "X$prog" || exec /usr/bin/super $prog ${1+"$@"}
 
 usage() {
 cat <<-END
 	Use:
-	    $prog hsfs | 4.2
+	    $prog
 
 	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 ) ;;
+    0 ) ;;
     * ) 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
+type="iso9660"
+# 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
+# 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
+echo /bin/mount -v -r -t $type -o nosuid /dev/cdrom /cdrom
+     /bin/mount -v -r -t $type -o nosuid /dev/cdrom /cdrom
diff --git a/sample.cdumount b/sample.cdumount
index c9b5248..adafcba 100644
--- a/sample.cdumount
+++ b/sample.cdumount
@@ -5,7 +5,7 @@
 
 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+"$@"}
+test "X$SUPERCMD" = "X$prog" || exec /usr/bin/super $prog ${1+"$@"}
 
 usage() {
 cat <<-END
@@ -22,9 +22,9 @@ case $# in
     * ) usage ; exit 1 ;;
 esac
 
-PATH=$PATH:/usr/etc		# SunOS 4.x needs this for mount; not sure
-				# if needed for umount.
-export PATH
+# PATH=$PATH:/usr/etc		# SunOS 4.x needs this for mount; not sure
+# 				# if needed for umount.
+# export PATH
 
-echo /etc/umount -v /cdrom
-     /etc/umount -v /cdrom
+echo /bin/umount -v /cdrom
+     /bin/umount -v /cdrom
diff --git a/sample.tab b/sample.tab
index 7ac78e6..2284d9f 100644
--- a/sample.tab
+++ b/sample.tab
@@ -1,6 +1,6 @@
 # This file lists commands that super(1) will execute for you as root.
 
-# See the super.5 man page for information.
+# See the super.tab(5) man page for information.
 
 # Global options =========================================================
 #
@@ -19,7 +19,7 @@
 
 # Log super actions to a file, under uid=sysmgr.  (Note that loguid has to
 # be part of same :global_options entry as logfile.)
-:global logfile=/usr/adm/super.log loguid=sysmgr
+:global logfile=/var/log/super.log loguid=sysmgr
 
 # Mail msgs regarding super errors to user joeblow (default is no mail):
 # :global	mail="/usr/bin/mailx -s '*** super ***' joeblow" 
@@ -84,6 +84,7 @@ restart		/usr/local/bin/restart	$TimeoutUsers \
 #	host in the netgroup "india" may mount a CD on the "india" machines.
 
 cdmount		/usr/local/bin/cdmount			\
+		uid=root				\
 		info="Mounts a CD-ROM on /cdrom"	\
 				tas@elgar		\
 				:xyz@{alpha,delta}	\