This website requires JavaScript.
Explore
Help
Register
Sign In
Emulator-Archive
/
box86
Watch
1
Star
0
Fork
0
You've already forked box86
mirror of
https://github.com/ptitSeb/box86.git
synced
2024-11-27 00:40:24 +00:00
Code
Issues
Actions
Packages
Projects
Releases
Wiki
Activity
21e9a43d21
box86
/
postinst
5 lines
93 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Refined .deb build script with arch naming and postinst
2021-07-10 08:07:57 +00:00
#!/bin/sh
Make postinst script failsafe "systemctl restart systemd-binfmt" can only succeed when systemd is the used init system and when the binfmt_misc kernel module is available. The kernel module may not be available right after a kernel upgrade or within a container where it needs to be loaded on the host. The common check for whether systemd is used or not is to check for the directory "/run/systemd/system" which is hereby added. Since modprobe may not be available and within a container always fails (regardless whether the host provides it), the service restart is allowed to fail without failing the postinst script and hence the package install. If the service restart fails, Box86 support in binfmt becomes effective on next system restart, given binfmt_misc is generally available. Furthermore binfmt is a convenience feature while generally Box86 can be used without it. It is hence no reason to hard fail the package install when systemd-binfmt fails for any reason. Signed-off-by: MichaIng <micha@dietpi.com>
2022-02-01 15:30:37 +00:00
if [ -d '/run/systemd/system' ]; then
systemctl restart systemd-binfmt || :
fi
Reference in New Issue
Copy Permalink