File: wrapper

package info (click to toggle)
abuse 2.00-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 12,708 kB
  • ctags: 15,389
  • sloc: ansic: 115,852; cpp: 6,792; lisp: 2,066; sh: 1,734; makefile: 1,601; asm: 264
file content (28 lines) | stat: -rw-r--r-- 824 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
# Abuse wrapper.
# by Joey Hess <joeyh@master.debian.org>

# Change to the directory all the abuse files are in.
cd /var/lib/games/abuse

# Fix PATH. This closes a security hole which could have netted users a 
# sgid games shell. Though now I hope I have fixed that particular problem
# in the abuse source.
PATH=.:/bin:/usr/bin

# Check to see if sound files are installed
if [ ! -d /var/lib/games/abuse/sfx ]; then
	nosound=-nosound
fi

# Run abuse.
/usr/lib/games/abuse/`basename $0` $nosound $@

# Kill these processes if they are still running. If abuse exits
# unexpectedly, they are often left running.
killall -KILL lnx_sdrv keydrv >/dev/null 2>/dev/null

# Clean up after the abuse program.
rm -f /tmp/.abuse_ndrv_in /tmp/.abuse_ndrv_out /tmp/.abuse_ndrv_lock \
	/tmp/sfxdrv.command /tmp/sfxdrv.signal