File: utf8script.rc

package info (click to toggle)
utf8script 1.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge, squeeze
  • size: 236 kB
  • ctags: 9
  • sloc: sh: 2,607; ansic: 85; makefile: 78; python: 2
file content (32 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download
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
#! /bin/sh

PROG=/usr/lib/utf8script

case "$1" in
  start)
	echo ":utf8script:M::\xef\xbb\xbf#!::$PROG:" > /proc/sys/fs/binfmt_misc/register
	return=$?
	;;
  stop)
	echo -1 > /proc/sys/fs/binfmt_misc/utf8script
	return=$?
	;;
  restart|reload|force-reload)
	$0 stop
	$0 start
	return=$?
	;;
  status)
	if [ -f /proc/sys/fs/binfmt_misc/utf8script ]
	then
	    cat /proc/sys/fs/binfmt_misc/utf8script
	else
	    echo utf8script is disabled
	fi
	;;
  *)
	echo "Usage: utf8script {start|stop|restart|reload|force-reload|status}"
	exit 3
esac

exit $return