FreeBSD Bugzilla – Attachment 225975 Details for
Bug 256754
[NEW PORT]: net/remarkable-devd: automatically configure the USB network connection for Remarkable tablets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated diff due to error in plist
remarkable-devd.diff (text/plain), 3.40 KB, created by
Trenton Schulz
on 2021-06-21 19:19:42 UTC
(
hide
)
Description:
Updated diff due to error in plist
Filename:
MIME Type:
Creator:
Trenton Schulz
Created:
2021-06-21 19:19:42 UTC
Size:
3.40 KB
patch
obsolete
>diff --git a/net/remarkable-devd/Makefile b/net/remarkable-devd/Makefile >new file mode 100644 >index 000000000000..afe06d34dcd9 >--- /dev/null >+++ b/net/remarkable-devd/Makefile >@@ -0,0 +1,27 @@ >+# Created by: Trenton Schulz <trueos@norwegianrockcat.com> >+ >+PORTNAME= remarkable-devd >+PORTVERSION= 1.0 >+CATEGORIES= net >+MASTER_SITES= # >+DISTFILES= # >+ >+MAINTAINER= trueos@norwegianrockcat.com >+COMMENT= Devd hotplug rules for Remarkable Tablet >+ >+LICENSE= BSD2CLAUSE >+ >+NO_BUILD= yes >+ >+USE_RC_SUBR= remarkable >+ >+SUB_FILES= pkg-message \ >+ remarkable.conf >+ >+PLIST_FILES= etc/devd/remarkable.conf >+ >+do-install: >+ ${INSTALL_DATA} ${WRKDIR}/remarkable.conf ${STAGEDIR}${PREFIX}/etc/devd/remarkable.conf >+ ${INSTALL_SCRIPT} ${WRKDIR}/remarkable ${STAGEDIR}${PREFIX}/etc/rc.d/remarkable >+ >+.include <bsd.port.mk> >diff --git a/net/remarkable-devd/files/pkg-message.in b/net/remarkable-devd/files/pkg-message.in >new file mode 100644 >index 000000000000..fd0cd91764e5 >--- /dev/null >+++ b/net/remarkable-devd/files/pkg-message.in >@@ -0,0 +1,14 @@ >+[ >+{ type: install >+ message: <<EOM >+A devd rule and rc script has been added to get an address from the >+remarkable tablet when it is connected. This is disabled by default. >+Set remarkable_enable=YES if you want this to happen automatically. Devd must also be restarted. >+ >+# sysrc remarkable_enable=YES >+# service devd restart >+ >+For details, see %%PREFIX%%/etc/devd/remarkable.conf and %%PREFIX%%/etc/rc.d/remarkable >+EOM >+} >+] >diff --git a/net/remarkable-devd/files/remarkable.conf.in b/net/remarkable-devd/files/remarkable.conf.in >new file mode 100644 >index 000000000000..66efd43b8dc2 >--- /dev/null >+++ b/net/remarkable-devd/files/remarkable.conf.in >@@ -0,0 +1,7 @@ >+# Connect the Remarkable 1 device and get the IP address >+attach 100 { >+ device-name "urndis.+"; >+ match "vendor" "0x04b3"; >+ match "product" "0x4010"; >+ action "%%PREFIX%%/etc/rc.d/remarkable start $device-name"; >+}; >diff --git a/net/remarkable-devd/files/remarkable.in b/net/remarkable-devd/files/remarkable.in >new file mode 100755 >index 000000000000..5033009ea16a >--- /dev/null >+++ b/net/remarkable-devd/files/remarkable.in >@@ -0,0 +1,45 @@ >+#!/bin/sh >+# >+# PROVIDE: webcamd >+# REQUIRE: FILESYSTEMS netif dbus >+# BEFORE: devd >+# KEYWORD: shutdown >+ >+. /etc/rc.subr >+ >+name=remarkable >+rcvar=remarkable_enable >+load_rc_config $name >+ >+devd_device=${2} >+start_cmd="${name}_start" >+ >+remarkable_start_devd() >+{ >+ # Find the USB Ethernet for the device >+ # We first grab the total number of interfaces in >+ # the case when all the interfaces are USB Ethernet >+ local total_ifs=`sysctl -n net.link.generic.system.ifcount` >+ local i=0 >+ for i in $(seq 0 $total_ifs) >+ do >+ ueparent=`sysctl -n net.ue.$i.%parent` >+ if [ $? -eq 0 ] && [ $ueparent = $devd_device ]; then >+ /sbin/dhclient ue$i >+ return >+ fi >+ done >+ echo "Couldn't find a remarkable tablet." >+} >+ >+remarkable_start() >+{ >+ if [ "$devd_device" ]; then >+ remarkable_start_devd >+ else >+ echo "Plug in your Remarkable to connect to it" >+ fi >+} >+ >+run_rc_command "$1" >+ >diff --git a/net/remarkable-devd/pkg-descr b/net/remarkable-devd/pkg-descr >new file mode 100644 >index 000000000000..9bf694f863e6 >--- /dev/null >+++ b/net/remarkable-devd/pkg-descr >@@ -0,0 +1,3 @@ >+Automatic IP address when connecting a Remarkable Tablet to USB. This >+makes it possible to access your Remarkable tablet via ssh or its USB >+web interface when its enabled.
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
Flags:
trueos
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 256754
:
225974
| 225975