Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
PR: 175311
In contrast to the approach in the PR I went with a loop looking for dump first then swap, as dump should take precedence over swap, in e.g.
# Device Mountpoint FStype Options Dump Pass# /dev/nvd0p3 none swap sw 0 0 /dev/nvd0p4 none dump sw 0 0
Comment Actions
or if we want to avoid reading /etc/fstab twice something like
dump_try=
swap_try=
while read dev mp type more ; do
[ "${type}" = dump -o "${type}" = swap ] || continue
case ${dev} in
*.bde|*.eli)
dumpon_warn_unencrypted
dev=${dev%.*}
;;
esac
[ -c "${dev}" ] || continue
eval ${type}_try=\"\${${type}_try} ${dev}\"
done </etc/fstab
for dev in ${dump_try} ${swap_try}; do
dumpon_try "${dev}" 2>/dev/null && return 0
done