/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-script

  • Committer: Teddy Hogeborn
  • Date: 2017-02-22 21:45:35 UTC
  • Revision ID: teddy@recompile.se-20170222214535-milf6w0b1krwpaex
Server bug fix: Use the mandos.conf "zeroconf" and "restore" options

Allow the "zeroconf" and "restore" options to actually work from the
mandos.conf file, in addition to command line options.

Closes: 855589
Reported-by: Pablo Abelenda <pabelenda@igalia.com>
Suggested-by: Pablo Abelenda <pabelenda@igalia.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
# Get DEVICE from /conf/initramfs.conf and other files
58
58
. /conf/initramfs.conf
59
59
for conf in /conf/conf.d/*; do
60
 
    [ -f ${conf} ] && . ${conf}
 
60
    [ -f "${conf}" ] && . "${conf}"
61
61
done
62
62
if [ -e /conf/param.conf ]; then
63
63
    . /conf/param.conf
94
94
# If we are connecting directly, run "configure_networking" (from
95
95
# /scripts/functions); it needs IPOPTS and DEVICE
96
96
if [ "${connect+set}" = set ]; then
 
97
    set +e                      # Required by library functions
97
98
    configure_networking
 
99
    set -e
98
100
    if [ -n "$connect" ]; then
99
101
        cat <<-EOF >>/conf/conf.d/mandos/plugin-runner.conf
100
102
        
113
115
# parse /conf/conf.d/cryptroot.  Format:
114
116
# target=sda2_crypt,source=/dev/sda2,key=none,keyscript=/foo/bar/baz
115
117
exec 3>/conf/conf.d/cryptroot.mandos
116
 
while read options; do
 
118
while read -r options; do
117
119
    newopts=""
118
120
    # Split option line on commas
119
121
    old_ifs="$IFS"