/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-23 19:11:11 UTC
  • Revision ID: teddy@recompile.se-20170223191111-poodzw0cr26utaz0
Update copyright year to 2017

* DBUS-API: Update copyright year to 2017.
* debian/copyright: - '' -
* intro.xml: - '' -
* mandos: - '' -
* mandos-clients.conf.xml: - '' -
* mandos-ctl: - '' -
* mandos-ctl.xml: - '' -
* mandos-keygen: - '' -
* mandos-keygen.xml: - '' -
* mandos-monitor: - '' -
* mandos-monitor.xml: - '' -
* mandos.conf.xml: - '' -
* mandos.xml: - '' -
* plugin-helpers/mandos-client-iprouteadddel.c: - '' -
* plugin-runner.c: - '' -
* plugin-runner.xml: - '' -
* plugins.d/askpass-fifo.c: - '' -
* plugins.d/askpass-fifo.xml: - '' -
* plugins.d/mandos-client.c: - '' -
* plugins.d/mandos-client.xml: - '' -
* plugins.d/password-prompt.c: - '' -
* plugins.d/password-prompt.xml: - '' -
* plugins.d/plymouth.c: - '' -
* plugins.d/plymouth.xml: - '' -
* plugins.d/splashy.c: - '' -
* plugins.d/splashy.xml: - '' -
* plugins.d/usplash.c: - '' -
* plugins.d/usplash.xml: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
test -x "$mandos"
114
114
 
115
115
# parse /conf/conf.d/cryptroot.  Format:
116
 
# target=sda2_crypt,source=/dev/sda2,rootdev,key=none,keyscript=/foo/bar/baz
117
 
# Is the root device specially marked?
118
 
changeall=yes
119
 
while read -r options; do
120
 
    case "$options" in
121
 
        rootdev,*|*,rootdev,*|*,rootdev)
122
 
            # If the root device is specially marked, don't change all
123
 
            # lines in crypttab by default.
124
 
            changeall=no
125
 
            ;;
126
 
    esac
127
 
done < /conf/conf.d/cryptroot
128
 
 
 
116
# target=sda2_crypt,source=/dev/sda2,key=none,keyscript=/foo/bar/baz
129
117
exec 3>/conf/conf.d/cryptroot.mandos
130
118
while read -r options; do
131
119
    newopts=""
132
 
    keyscript=""
133
 
    changethis="$changeall"
134
120
    # Split option line on commas
135
121
    old_ifs="$IFS"
136
122
    IFS="$IFS,"
142
128
                newopts="$newopts,$opt"
143
129
                ;;
144
130
            "") : ;;
145
 
            # Always use Mandos on the root device, if marked
146
 
            rootdev)
147
 
                changethis=yes
148
 
                newopts="$newopts,$opt"
149
 
                ;;
150
 
            # Don't use Mandos on resume device, if marked
151
 
            resumedev)
152
 
                changethis=no
153
 
                newopts="$newopts,$opt"
154
 
                ;;
155
131
            *)
156
132
                newopts="$newopts,$opt"
157
133
                ;;
160
136
    IFS="$old_ifs"
161
137
    unset old_ifs
162
138
    # If there was no keyscript option, add one.
163
 
    if [ "$changethis" = yes ] && [ -z "$keyscript" ]; then
 
139
    if [ -z "$keyscript" ]; then
164
140
        replace_cryptroot=yes
165
141
        newopts="$newopts,keyscript=$mandos"
166
142
    fi