/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to initramfs-tools-hook

  • Committer: Teddy Hogeborn
  • Date: 2015-07-06 20:29:34 UTC
  • mfrom: (738.1.6 route-external)
  • Revision ID: teddy@recompile.se-20150706202934-09j06jm2fiw1bn80
Merge change to add local route when network is "unreachable".

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
CONFDIR="/conf/conf.d/mandos"
71
71
MANDOSDIR="/lib/mandos"
72
72
PLUGINDIR="${MANDOSDIR}/plugins.d"
 
73
PLUGINHELPERDIR="${MANDOSDIR}/plugin-helpers"
73
74
HOOKDIR="${MANDOSDIR}/network-hooks.d"
74
75
 
75
76
# Make directories
76
77
install --directory --mode=u=rwx,go=rx "${DESTDIR}${CONFDIR}" \
77
 
        "${DESTDIR}${MANDOSDIR}" "${DESTDIR}${HOOKDIR}"
 
78
        "${DESTDIR}${MANDOSDIR}" "${DESTDIR}${HOOKDIR}" \
 
79
        "${DESTDIR}${PLUGINHELPERDIR}"
78
80
install --owner=${mandos_user} --group=${mandos_group} --directory \
79
81
    --mode=u=rwx "${DESTDIR}${PLUGINDIR}"
80
82
 
98
100
    esac
99
101
done
100
102
 
 
103
# Copy the packaged plugin helpers
 
104
for file in "$libdir"/mandos/plugin-helpers/*; do
 
105
    base="`basename \"$file\"`"
 
106
    # Is this plugin overridden?
 
107
    if [ -e "/etc/mandos/plugin-helpers/$base" ]; then
 
108
        continue
 
109
    fi
 
110
    case "$base" in
 
111
        *~|.*|\#*\#|*.dpkg-old|*.dpkg-bak|*.dpkg-new|*.dpkg-divert)
 
112
            : ;;
 
113
        "*") : ;;
 
114
        *) copy_exec "$file" "${PLUGINHELPERDIR}" ;;
 
115
    esac
 
116
done
 
117
 
101
118
# Copy any user-supplied plugins
102
119
for file in /etc/mandos/plugins.d/*; do
103
120
    base="`basename \"$file\"`"
109
126
    esac
110
127
done
111
128
 
 
129
# Copy any user-supplied plugin helpers
 
130
for file in /etc/mandos/plugin-helpers/*; do
 
131
    base="`basename \"$file\"`"
 
132
    case "$base" in
 
133
        *~|.*|\#*\#|*.dpkg-old|*.dpkg-bak|*.dpkg-new|*.dpkg-divert)
 
134
            : ;;
 
135
        "*") : ;;
 
136
        *) copy_exec "$file" "${PLUGINHELPERDIR}" ;;
 
137
    esac
 
138
done
 
139
 
112
140
# Get DEVICE from initramfs.conf and other files
113
141
. /etc/initramfs-tools/initramfs.conf
114
142
for conf in /etc/initramfs-tools/conf.d/*; do