Last change
on this file since 1337 was
1337,
checked in by geofft, 15 years ago
|
execsys: Stop automatically generating the binfmt_misc configuration.
While we're there, kill an autoconf macro that was never used.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[1] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
[110] | 3 | # execsys-binfmt: test1 |
---|
[1] | 4 | # |
---|
[27] | 5 | # chkconfig: 2345 2 98 |
---|
[1] | 6 | # description: test2 |
---|
| 7 | # |
---|
[110] | 8 | ### BEGIN INIT INFO |
---|
| 9 | # Provides: execsys-binfmt |
---|
| 10 | # Required-Start: $syslog |
---|
| 11 | # Required-Stop: $syslog |
---|
| 12 | # Should-Start: $local_fs |
---|
| 13 | # Should-Stop: $local_fs |
---|
| 14 | # Default-Start: 2 3 4 5 |
---|
| 15 | # Default-Stop: 0 1 6 |
---|
| 16 | # Short-Description: Start scripts.mit.edu execsys system |
---|
| 17 | # Description: Decides what interpreter to use to execute files |
---|
| 18 | ### END INIT INFO |
---|
[1] | 19 | |
---|
[27] | 20 | stop () |
---|
| 21 | { |
---|
| 22 | echo "-1" > /proc/sys/fs/binfmt_misc/status |
---|
| 23 | umount /proc/sys/fs/binfmt_misc |
---|
| 24 | } |
---|
[1] | 25 | |
---|
[27] | 26 | start () |
---|
| 27 | { |
---|
| 28 | mount -t binfmt_misc none /proc/sys/fs/binfmt_misc |
---|
[1337] | 29 | cat > /proc/sys/fs/binfmt_misc/register <<REGISTER |
---|
| 30 | :pl:E::pl::/usr/bin/perl: |
---|
| 31 | :php:E::php::/usr/bin/php-cgi: |
---|
| 32 | :py:E::py::/usr/bin/python: |
---|
| 33 | :exe:E::exe::/usr/bin/mono: |
---|
| 34 | REGISTER |
---|
[27] | 35 | } |
---|
| 36 | |
---|
| 37 | case "$1" in |
---|
| 38 | start) |
---|
| 39 | stop 2>/dev/null || : |
---|
| 40 | start |
---|
| 41 | ;; |
---|
| 42 | stop) |
---|
| 43 | stop |
---|
| 44 | ;; |
---|
[110] | 45 | force-reload) |
---|
| 46 | stop |
---|
| 47 | start |
---|
| 48 | ;; |
---|
[27] | 49 | restart) |
---|
| 50 | stop |
---|
| 51 | start |
---|
| 52 | ;; |
---|
| 53 | *) |
---|
[110] | 54 | echo "Usage: $0 [start|stop|restart|force-reload]" >&2 |
---|
[27] | 55 | exit 2 |
---|
| 56 | ;; |
---|
| 57 | esac |
---|
| 58 | |
---|
| 59 | exit $? |
---|
Note: See
TracBrowser
for help on using the repository browser.