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
|
#! /bin/sh
# Copyright (C) 2002, 2005, 2009, 2010, 2014 Colin Watson.
#
# This file is part of binfmt-support.
#
# binfmt-support is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# binfmt-support is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with binfmt-support; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a simple generic SysV init script. It may need adjustments for
# distribution policies, for example logging and LSB information.
NAME=binfmt-support
DESC="additional executable binary formats"
if [ "$(uname)" != Linux ]; then
exit 0
fi
test -x @sbindir@/update-binfmts || exit 0
set -e
CODE=0
case "$1" in
start)
echo -n "Enabling $DESC: "
@sbindir@/update-binfmts --enable || CODE=$?
echo "$NAME."
exit $CODE
;;
stop)
echo -n "Disabling $DESC: "
@sbindir@/update-binfmts --disable || CODE=$?
echo "$NAME."
exit $CODE
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
|