FreeBSD Bugzilla – Attachment 205251 Details for
Bug 238735
New RC script to load binmisc activators
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
binmisc.rc.diff
binmisc.rc.diff (text/plain), 2.09 KB, created by
WHR
on 2019-06-21 08:21:52 UTC
(
hide
)
Description:
binmisc.rc.diff
Filename:
MIME Type:
Creator:
WHR
Created:
2019-06-21 08:21:52 UTC
Size:
2.09 KB
patch
obsolete
>Index: libexec/rc/rc.d/Makefile >=================================================================== >--- libexec/rc/rc.d/Makefile (revision 349266) >+++ libexec/rc/rc.d/Makefile (working copy) >@@ -16,6 +16,7 @@ > adjkerntz \ > archdep \ > bgfsck \ >+ binmisc \ > ${_blacklistd} \ > ${_bluetooth} \ > bridge \ >Index: libexec/rc/rc.d/binmisc >=================================================================== >--- libexec/rc/rc.d/binmisc (nonexistent) >+++ libexec/rc/rc.d/binmisc (working copy) >@@ -0,0 +1,60 @@ >+#!/bin/sh >+ >+# PROVIDE: binmisc >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+ >+. /etc/rc.subr >+ >+name="binmisc" >+desc="Load binmisc rules" >+rcvar="binmisc_enable" >+binmiscctl_program="/usr/sbin/binmiscctl" >+start_cmd="binmisc_start" >+stop_cmd="binmisc_stop" >+status_cmd="binmisc_status" >+ >+# To enable 'status' >+procname="${binmiscctl_program}" >+ >+binmisc_start() { >+ local name magic size mask offset _i >+ for name in ${binmisc_names}; do >+ eval "magic=\"\${binmisc_${name}_magic}\"" >+ eval "size=\"\${binmisc_${name}_size}\"" >+ eval "mask=\"\${binmisc_${name}_mask}\"" >+ eval "interpreter=\"\${binmisc_${name}_interpreter}\"" >+ eval "offset=\"\${binmisc_${name}_offset:-0}\"" >+ if [ -z "${mask}" ]; then >+ # It currently doesn't work without a '--mask' >+ _i=0 >+ while [ ${_i} -lt ${size} ]; do >+ mask="\\xff${mask}" >+ _i=$((_i+1)) >+ done >+ fi >+ ${binmiscctl_program} add ${name} --magic "${magic}" --size "${size}" --mask "${mask}" --interpreter "${interpreter}" --offset "${offset}" --set-enabled >+ done >+} >+ >+binmisc_stop() { >+ for name in ${binmisc_names}; do >+ ${binmiscctl_program} remove ${name} >+ done >+ kldstat -q -n imgact_binmisc.ko && kldunload imgact_binmisc.ko >+} >+ >+binmisc_status() { >+ if ! kldstat -q -m imgact_binmisc; then >+ echo "Kernel module imgact_binmisc not loaded" 1>&2 >+ return 1 >+ fi >+ ${binmiscctl_program} list >+} >+ >+ >+load_rc_config ${name} >+ >+: ${binmisc_enable="NO"} >+ >+run_rc_command "$1" > >Property changes on: libexec/rc/rc.d/binmisc >___________________________________________________________________ >Added: svn:executable >## -0,0 +1 ## >+* >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238735
:
205249
| 205251