diff --git a/net/remarkable-devd/Makefile b/net/remarkable-devd/Makefile index bf533ed082be..02e167d148b9 100644 --- a/net/remarkable-devd/Makefile +++ b/net/remarkable-devd/Makefile @@ -1,27 +1,28 @@ # Created by: Trenton Schulz PORTNAME= remarkable-devd PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= # DISTFILES= # MAINTAINER= trueos@norwegianrockcat.com COMMENT= Devd hotplug rules for Remarkable Tablet LICENSE= BSD2CLAUSE USE_RC_SUBR= remarkable NO_BUILD= yes 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 diff --git a/net/remarkable-devd/files/remarkable.in b/net/remarkable-devd/files/remarkable.in index 5033009ea16a..b7c4aaa6d082 100644 --- a/net/remarkable-devd/files/remarkable.in +++ b/net/remarkable-devd/files/remarkable.in @@ -1,45 +1,45 @@ #!/bin/sh # -# PROVIDE: webcamd -# REQUIRE: FILESYSTEMS netif dbus +# PROVIDE: remarkable +# REQUIRE: FILESYSTEMS netif # 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"