From: Daniel F. Dickinson Date: Sun, 10 May 2026 02:33:24 +0000 (-0400) Subject: nut: move drivers to libexec X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b0b686fe240209be36611220db097aed65e74846;p=openwrt-packages.git nut: move drivers to libexec They are executables not libraries, so move the UPS drivers to /usr/libexec/nut. Signed-off-by: Daniel F. Dickinson --- diff --git a/net/nut/Makefile b/net/nut/Makefile index 3946ad370..58643b458 100644 --- a/net/nut/Makefile +++ b/net/nut/Makefile @@ -383,9 +383,9 @@ define DriverPackage endef define Package/nut-driver-$(2)/install - $(INSTALL_DIR) $$(1)/lib/nut - $(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2) $$(1)/lib/nut/ - $(if $(filter $(2),clone),$(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2)-outlet $$(1)/lib/nut/) + $(INSTALL_DIR) $$(1)/usr/libexec/nut + $(CP) $$(PKG_INSTALL_DIR)/usr/libexec/nut/$(2) $$(1)/usr/libexec/nut/ + $(if $(filter $(2),clone),$(CP) $$(PKG_INSTALL_DIR)/usr/libexec/nut/$(2)-outlet $$(1)/usr/libexec/nut/) endef endef define DriverDescription @@ -582,7 +582,7 @@ CONFIGURE_ARGS += \ --without-nut_monitor \ --with-statepath=/var/run/nut \ --with-pidpath=/var/run \ - --with-drvpath=/lib/nut \ + --with-drvpath=/usr/libexec/nut \ --with-user=nut \ --with-group=nut \ $(if $(CONFIG_PACKAGE_nut-web-cgi),--with-gd-includes="`pkg-config --cflags gdlib`") \ diff --git a/net/nut/files/nut-server.init b/net/nut/files/nut-server.init index be1cd45e2..e62a3c364 100755 --- a/net/nut/files/nut-server.init +++ b/net/nut/files/nut-server.init @@ -368,7 +368,7 @@ start_ups_driver() { procd_set_param stdout 0 # Subset of stderr procd_set_param env NUT_QUIET_INIT_UPSNOTIFY=true procd_set_param env NUT_STATEPATH="${STATEPATH}" - procd_set_param command /lib/nut/"${driver}" -FF -a "$ups" ${RUNAS:+-u "$RUNAS"} + procd_set_param command /usr/libexec/nut/"${driver}" -FF -a "$ups" ${RUNAS:+-u "$RUNAS"} procd_close_instance haveupscfg=1 } @@ -516,7 +516,7 @@ stop_ups_driver() { config_get driver "$ups" driver "usbhid-ups" if procd_running nut-server "$ups"; then - signal_instance "$ups" "$driver" "/lib/nut/'${driver}' -c exit -a '${ups}'" "TERM" "${STATEPATH}/${driver}-${ups}.pid" + signal_instance "$ups" "$driver" "/usr/libexec/nut/'${driver}' -c exit -a '${ups}'" "TERM" "${STATEPATH}/${driver}-${ups}.pid" if procd_running nut-server upsd >/dev/null 2>&1; then signal_instance upsd upsd "upsd -c stop" "TERM" "${STATEPATH}/upsd.pid" "procd_kill nut-server upsd" fi @@ -546,7 +546,7 @@ reload_ups_driver() { # Try to reload, otherwise exit politely, then stop and restart procd instance if procd_running nut-server "$ups"; then - signal_instance "$ups" "$driver" "/lib/nut/'${driver}' -c reload-or-exit -a '${ups}'" HUP "${STATEPATH}/${driver}-${ups}.pid" + signal_instance "$ups" "$driver" "/usr/libexec/nut/'${driver}' -c reload-or-exit -a '${ups}'" HUP "${STATEPATH}/${driver}-${ups}.pid" fi /etc/init.d/nut-server start "$ups" 2>&1 | logger -t nut-server } diff --git a/net/nut/files/nutshutdown b/net/nut/files/nutshutdown index 7270f983f..f81152704 100755 --- a/net/nut/files/nutshutdown +++ b/net/nut/files/nutshutdown @@ -14,7 +14,7 @@ shutdown_instance() { # Only FSD if killpower was indicated if [ -f /var/run/killpower ]; then - /lib/nut/"${driver}" -a "$cfg" -k + /usr/libexec/nut/"${driver}" -a "$cfg" -k fi }