[OpenWrt-Devel] [PATCH 1/3] procd: start additional consoles during hotplugging
    Michael Heimpold 
    mhei at heimpold.de
       
    Mon Nov  4 18:39:40 EST 2019
    
    
  
Now that 'start-console' procd command has reached the main repo,
we can add a rule to start consoles on serial devices which are
created when USB gadget driver reports creation with hotplugging.
Signed-off-by: Michael Heimpold <mhei at heimpold.de>
---
 package/system/procd/Makefile           | 2 +-
 package/system/procd/files/hotplug.json | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 8090b87dd5..c4b86ba746 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procd
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json
index f676bac79e..7e0f129d35 100644
--- a/package/system/procd/files/hotplug.json
+++ b/package/system/procd/files/hotplug.json
@@ -37,6 +37,10 @@
 					[ "load-firmware", "/lib/firmware" ],
 					[ "return" ]
 				]
+			],
+			[ "if",
+				[ "regex", "DEVNAME", "^ttyGS" ],
+				[ "start-console", "%DEVNAME%" ]
 			]
 		],
 		"remove" : [
-- 
2.17.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
    
    
More information about the openwrt-devel
mailing list