File: binfmt-support.in

package info (click to toggle)
binfmt-support 2.2.2-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,060 kB
  • sloc: ansic: 31,469; sh: 6,548; python: 166; makefile: 137
file content (41 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (7)
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
#! /sbin/runscript

# Copyright (C) 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

depend()
{
	need localmount
	after bootmisc
}

start()
{
	[ "$(uname)" = Linux ] || return 0
	ebegin "Enabling additional executable binary formats"
	@sbindir@/update-binfmts --enable
	eend $?
}

stop()
{
	[ "$(uname)" = Linux ] || return 0
	ebegin "Disabling additional executable binary formats"
	@sbindir@/update-binfmts --disable
	eend $@
}