vsta

Check-in [9b4cf5d0b4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Put all /bin shell programs under source control here.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:9b4cf5d0b4e9969d1dded3c871f18d3178905ab4d483ee0f8fc48be0282ef0d7
User & Date: vandys 2002-01-01 20:06:34
Context
2002-01-04
17:56
More tweaking of distribution under CVS. check-in: a1c0fe17bf user: vandys tags: master, trunk
2002-01-01
20:06
Put all /bin shell programs under source control here. check-in: 9b4cf5d0b4 user: vandys tags: master, trunk
2001-12-21
14:50
Fix warnings. Add missing file. check-in: 2e2f499e93 user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added vsta/src/bin/cmds/hostname.sh.





>
>
1
2
#!/bin/sh
exec uname -n

Changes to vsta/src/bin/cmds/makefile.

10
11
12
13
14
15
16


17
18
19
20
21
22
23
...
151
152
153
154
155
156
157
158
	sleep.o stat.o strings.o swapd.o test.o touch.o tput.o \
	uname.o wc.o which.o xargs.o dump.o operators.o true.o \
	false.o whoami.o egrep.o fgrep.o awk.o cc.o [.o view.o \
	ascii.o dirname.o

include ../../makefile.all



rcsdo: rcsdo.o
	$(LD) $(LDFLAGS) -o rcsdo $(CRT0) rcsdo.o -lc

changed: changed.o
	$(LD) $(LDFLAGS) -o changed $(CRT0) changed.o -lc

uname: uname.o
................................................................................

dirname: dirname.o
	$(LD) $(LDFLAGS) -o dirname $(CRT0) dirname.o -lc

install: all
	strip $(OUT)
	cp $(OUT) $(ROOT)/bin
	cp man.sh $(ROOT)/bin/man







>
>







 







|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
153
154
155
156
157
158
159
160
	sleep.o stat.o strings.o swapd.o test.o touch.o tput.o \
	uname.o wc.o which.o xargs.o dump.o operators.o true.o \
	false.o whoami.o egrep.o fgrep.o awk.o cc.o [.o view.o \
	ascii.o dirname.o

include ../../makefile.all

SHPROGS=hostname man more mt reboot shutdown

rcsdo: rcsdo.o
	$(LD) $(LDFLAGS) -o rcsdo $(CRT0) rcsdo.o -lc

changed: changed.o
	$(LD) $(LDFLAGS) -o changed $(CRT0) changed.o -lc

uname: uname.o
................................................................................

dirname: dirname.o
	$(LD) $(LDFLAGS) -o dirname $(CRT0) dirname.o -lc

install: all
	strip $(OUT)
	cp $(OUT) $(ROOT)/bin
	for x in $(SHPROGS) ; do cp $$x.sh $(ROOT)/bin/$$x ; done

Added vsta/src/bin/cmds/more.sh.





>
>
1
2
#!/bin/sh
exec less $*

Added vsta/src/bin/cmds/mt.sh.

































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#!/bin/sh
# mt - Magnetic Tape Commands, VSTa style
# Usage:
#	mt [-f tapedev] command [count]
#
# If 'tapedev' is not specified, mt uses the $TAPE environment variable.
# If $TAPE is not specified, the tape device is '/dev/cam/st0'.
#

if test $# -lt 1 -o $# -gt 4 ; then
	echo "Usage: mt [-f tapedev] command [count]"
	exit 1
fi

#
# Initialize variables
#
command=""
count=1
tapedev=""

#
# Parse command line paremeters
#
while test $# -gt 0 ; do
	case $1 in
	-f)
		tapedev=$2
		shift
		shift
		;;
	*)
		if test "$command" = "" ; then
			command=$1
		else
			count=$1
		fi
		shift
		;;
	esac
done

if test "$command" = "" ; then
	echo "mt: no command specified"
	exit 1
fi

if test "$tapedev" = ""; then
	if test "$TAPE" = ""; then
		tapedev=/dev/cam/st0
	else
		tapedev=$TAPE
	fi
fi

#
# Translate command into "mtio.h" command
#
case $command in
weof)
	command=MTWEOF
	;;
fsf)
	command=MTFSF
	;;
bsf)
	command=MTBSF
	;;
fsr)
	command=MTFSR
	;;
bsr)
	command=MTBSR
	;;
rew)
	command=MTREW
	;;
offl)
	command=MTOFFL
	;;
nop)
	command=MTNOP
	;;
cache)
	command=MTCACHE
	;;
nocache)
	command=MTNOCACHE
	;;
setbsiz)
	command=MTSETBSIZ
	;;
setdnsty)
	command=MTSETDNSTY
	;;
setdrvbuffer)
	command=MTSETDRVBUFFER
	;;
*)
	echo "mt: illegal command"
	exit 1
esac

#echo command = $command count = $count tapedev = $tapedev

#
# Do the Magnetic Tape operation
#
stat -w $tapedev "MTIOCTOP=$command $count"

exit 0

Added vsta/src/bin/cmds/reboot.sh.









>
>
>
>
1
2
3
4
#!/bin/sh
echo "Feel free just to hit the reset button or power cycle;"
echo "VSTa tends to keep the disks in sync all the time."
exit 0

Added vsta/src/bin/cmds/shutdown.sh.







>
>
>
1
2
3
#!/bin/sh
reboot
exit 0