=== modified file 'initramfs-tools-hook' --- initramfs-tools-hook 2011-10-05 16:56:06 +0000 +++ initramfs-tools-hook 2011-11-13 20:49:21 +0000 @@ -68,6 +68,7 @@ CONFDIR="/conf/conf.d/mandos" MANDOSDIR="/lib/mandos" PLUGINDIR="${MANDOSDIR}/plugins.d" +HOOKDIR="${MANDOSDIR}/network-hooks.d" # Make directories install --directory --mode=u=rwx,go=rx "${DESTDIR}${CONFDIR}" \ @@ -106,6 +107,24 @@ esac done +# Copy network hooks +for hook in /etc/mandos/network-hooks.d/*; do + case "`basename \"$hook\"`" in + "*") continue ;; + *[!A-Za-z0-9_-]*) continue ;; + *) test -d "$hook" || copy_exec "$hook" "${HOOKDIR}" ;; + esac + # Copy any files needed by the network hook + MANDOSNETHOOKDIR=/etc/mandos/network-hooks.d MODE=files \ + "$hook" files | while read file target; do + if [ -z "${target}" ]; then + copy_exec "$file" + else + copy_exec "$file" "$target" + fi + done +done + # GPGME needs /usr/bin/gpg if [ ! -e "${DESTDIR}/usr/bin/gpg" \ -a -n "`ls \"${DESTDIR}\"/usr/lib/libgpgme.so* \ === modified file 'plugins.d/mandos-client.c' --- plugins.d/mandos-client.c 2011-11-13 13:55:45 +0000 +++ plugins.d/mandos-client.c 2011-11-13 20:49:21 +0000 @@ -1688,6 +1688,11 @@ dup2(devnull, STDIN_FILENO); close(devnull); dup2(STDERR_FILENO, STDOUT_FILENO); + ret = setenv("MANDOSNETHOOKDIR", hookdir, 1); + if(ret == -1){ + perror_plus("setenv"); + exit(1); + } ret = setenv("DEVICE", interface, 1); if(ret == -1){ perror_plus("setenv"); === modified file 'plugins.d/mandos-client.xml' --- plugins.d/mandos-client.xml 2011-11-12 18:04:35 +0000 +++ plugins.d/mandos-client.xml 2011-11-13 20:49:21 +0000 @@ -322,8 +322,8 @@ Network hook directory. The default directory is - /lib/mandos/network-hooks.d. + /lib/mandos/network-hooks.d.