Ajouter les fichiers manquants (unités systemd, hooks DHCP) et corriger install-pve-netconfig.sh
- Les fichiers pve-netconfig.service, pve-netconfig-watch.service, pve-netconfig.timer, dhclient-hook et dhcpcd-hook n'avaient jamais ete ajoutes au depot git : un git clone frais ne les contenait pas, ce qui faisait echouer install-pve-netconfig.sh (install: cannot stat ...). - install-pve-netconfig.sh applique desormais automatiquement la configuration DHCP (apply-interfaces + check + demarrage des services) au lieu de se limiter a des instructions manuelles, avec une option SKIP_AUTO_APPLY=1 pour desactiver ce comportement. - Bit executable ajoute sur install-pve-netconfig.sh, dhclient-hook et dhcpcd-hook. - README.md mis a jour avec l'URL reelle du depot (https://git.sdeinfo.app/sde/pvedhcp.git) et le nouveau comportement automatique. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
#===============================================================================
|
||||
# Hook dhcpcd.
|
||||
# Installe dans /usr/lib/dhcpcd/dhcpcd-hooks/90-pve-netconfig
|
||||
#
|
||||
# dhcpcd execute ce hook avec les fonctions/variables $interface et $reason
|
||||
# deja en environnement (BOUND, RENEW, REBIND, ...). On se contente de
|
||||
# resynchroniser /etc/hosts et de lever un eventuel fallback statique.
|
||||
#===============================================================================
|
||||
|
||||
SCRIPT="/usr/local/sbin/pve-netconfig.sh"
|
||||
|
||||
[[ -x "$SCRIPT" ]] || return 0 2>/dev/null || exit 0
|
||||
|
||||
case "${reason:-}" in
|
||||
BOUND|RENEW|REBIND|REBOOT)
|
||||
"$SCRIPT" check >/dev/null 2>&1 &
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user