🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sysuh3c
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haswelliris/h3c.git
PKG_SOURCE_DATE:=2019-03-01
PKG_SOURCE_VERSION:=8a3e0b5a9a5d989e7d8b2105d09a394c3663e016
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/sysuh3c
SECTION:=net
CATEGORY:=Network
SUBMENU:=Campus Network
TITLE:=H3C client for Sun Yat-sen University
endef
define Package/sysuh3c/conffiles
/etc/config/sysuh3c
endef
define Package/sysuh3c/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/h3c $(1)/usr/sbin/sysuh3c
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/sysuh3c.config $(1)/etc/config/sysuh3c
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/sysuh3c.init $(1)/etc/init.d/sysuh3c
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/sysuh3c.uci $(1)/etc/uci-defaults/99-sysuh3c-migrate
endef
$(eval $(call BuildPackage,sysuh3c))
+8
View File
@@ -0,0 +1,8 @@
config sysuh3c 'config'
option enabled '0'
option username ''
option password ''
option method ''
option ifname ''
+37
View File
@@ -0,0 +1,37 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
CONF="sysuh3c"
start_service() {
config_load "$CONF"
local enabled
config_get_bool enabled "config" "enabled" "0"
[ "$enabled" -eq "1" ] || return 1
local username password method ifname
config_get username "config" "username"
config_get password "config" "password"
config_get method "config" "method"
config_get ifname "config" "ifname"
procd_open_instance
procd_set_param command "/usr/sbin/sysuh3c"
procd_append_param command -u "$username"
[ -z "$password" ] || procd_append_param command -p "$password"
[ -z "$method" ] || procd_append_param command -m "$method"
procd_append_param command -i "$ifname"
procd_set_param respawn 3600 10 5
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger "$CONF"
}
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
grep -q "config login$" "/etc/config/sysuh3c" || exit 0
sed -e "s,config login,config sysuh3c 'config'," \
-e "s,option enable ,option enabled ," \
-e "/blockstartup/d" \
-i "/etc/config/sysuh3c"
exit 0
+25
View File
@@ -0,0 +1,25 @@
--- a/h3c.h
+++ b/h3c.h
@@ -120,19 +120,19 @@
#define MD5_XOR 0
#define MD5_MD5 1
-struct eapol {
+extern struct eapol {
unsigned char version;
unsigned char type;
unsigned short length;
}__attribute__ ((packed)) eapol;
-struct eap {
+extern struct eap {
unsigned char code;
unsigned char id;
unsigned short length;
}__attribute__ ((packed)) eap;
-struct packet {
+extern struct packet {
struct ether_header eth_header;
struct eapol eapol_header;
struct eap eap_header;