#! /bin/sh ### BEGIN INIT INFO # Provides: binfmt-support # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Support for extra binary formats # Description: Enable support for extra binary formats using the Linux # kernel's binfmt_misc facility. ### END INIT INFO setglobal PATH = '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin' setglobal NAME = 'binfmt-support' setglobal DESC = '"additional executable binary formats'" if test $[uname] != Linux { exit 0 } which update-binfmts >/dev/null !2 > !1 || exit 0 source /lib/lsb/init-functions test -r /etc/default/rcS && source /etc/default/rcS set -e setglobal CODE = '0' match $1 { with start if init_is_upstart { exit 1 } log_daemon_msg "Enabling $DESC" $NAME update-binfmts --enable || setglobal CODE = $Status log_end_msg $CODE exit $CODE with stop if init_is_upstart { exit 0 } log_daemon_msg "Disabling $DESC" $NAME update-binfmts --disable || setglobal CODE = $Status log_end_msg $CODE exit $CODE with restart|force-reload if init_is_upstart { exit 1 } $0 stop $0 start with * setglobal N = "/etc/init.d/$NAME" echo "Usage: $N {start|stop|restart|force-reload}" > !2 exit 1 } exit 0