Bug 238735 - New RC script to load binmisc activators
Summary: New RC script to load binmisc activators
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: feature, patch
Depends on:
Blocks:
 
Reported: 2019-06-21 07:43 UTC by WHR
Modified: 2019-06-27 09:11 UTC (History)
1 user (show)

See Also:


Attachments
/etc/rc.d/binmisc (1.36 KB, application/x-shellscript)
2019-06-21 07:43 UTC, WHR
no flags Details
binmisc.rc.diff (2.09 KB, patch)
2019-06-21 08:21 UTC, WHR
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description WHR 2019-06-21 07:43:48 UTC
Created attachment 205249 [details]
/etc/rc.d/binmisc

Hello.

I wrote a rc script that wraps binmiscctl(8) to load custom binmisc activators on boot time automatically.
I think this script may be useful to others, if it could be included in base system.

Usage:
Put following into 'rc.conf':

binmisc_enable="YES"
binmisc_names="<name> [<name>] [...]"
binmisc_<name>_magic=<magic-bytes>
binmisc_<name>_size="<number>"
binmisc_<name>_interpreter="<path>"
[binmisc_<name>_mask=<mask>]
[binmisc_<name>_offset="<number>"]


Example:

binmisc_enable="YES"
binmisc_names="mono"
binmisc_mono_magic='\x4d\x5a\x90\x00\x03\x00\x00\x00\x04\x00\x00\x00\xff\xff\x00\x00\xb8\x00\x00\x00'
binmisc_mono_size="20"
binmisc_mono_interpreter="/usr/local/bin/mono"
Comment 1 WHR 2019-06-21 08:21:52 UTC
Created attachment 205251 [details]
binmisc.rc.diff

Add a SVN diff file.