Created
November 21, 2018 10:55
-
-
Save tspspi/7ea094f95b9a0502041c8861dd8c8304 to your computer and use it in GitHub Desktop.
FreeBSD rc.d init script for sysutils/usb_modeswitch with Huawei Modem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PROVIDE: usbmodeswitch | |
# REQUIRE: FILESYSTEMS | |
# BEFORE: ppp | |
# usb modeswitch script for huawei modem | |
# with sysutils/usb_modeswitch | |
. /etc/rc.subr | |
name="usbmodeswitch" | |
start_cmd="usbmodeswitch_start" | |
stop_cmd=":" | |
rcvar="usbmodeswitch_enable" | |
usbmodeswitch_start() | |
{ | |
/usr/local/sbin/usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14dc -M "55534243123456780000000000000011063000000100010000000000000000" | |
/bin/sleep 10 | |
} | |
load_rc_config $name | |
run_rc_command "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment