small fixes
This commit is contained in:
parent
5a0aeb128f
commit
cfe0184eb4
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
IFS=,; set -- $luks_opts; unset IFS
|
IFS=,; set -- $luks_opts; unset IFS
|
||||||
|
|
||||||
set -C; for opt; do case "${opt%%=*}" in
|
for opt; do case "${opt%%=*}" in
|
||||||
key | header)
|
key | header)
|
||||||
cp "${opt#*=}" "${tmpdir}/root/${opt%%=*}"
|
cp "${opt#*=}" "${tmpdir}/root/${opt%%=*}"
|
||||||
chmod 400 "${tmpdir}/root/${opt%%=*}"
|
chmod 400 "${tmpdir}/root/${opt%%=*}"
|
||||||
@ -35,8 +35,7 @@
|
|||||||
sed "s|${opt#*=}|/root/${opt%%=*}|" \
|
sed "s|${opt#*=}|/root/${opt%%=*}|" \
|
||||||
"${tmpdir}/etc/tinyramfs/config" > "${tmpdir}/_"
|
"${tmpdir}/etc/tinyramfs/config" > "${tmpdir}/_"
|
||||||
|
|
||||||
cp "${tmpdir}/_" "${tmpdir}/etc/tinyramfs/config"
|
mv "${tmpdir}/_" "${tmpdir}/etc/tinyramfs/config"
|
||||||
chmod 600 "${tmpdir}/etc/tinyramfs/config"
|
chmod 600 "${tmpdir}/etc/tinyramfs/config"
|
||||||
rm "${tmpdir}/_"
|
esac || panic; done
|
||||||
esac || panic; done; set +C
|
|
||||||
}
|
}
|
||||||
|
16
init
16
init
@ -75,14 +75,14 @@ parse_cmdline()
|
|||||||
{
|
{
|
||||||
read -r cmdline < /proc/cmdline
|
read -r cmdline < /proc/cmdline
|
||||||
|
|
||||||
for line in $cmdline; do case "$line" in
|
for line in $cmdline; do case "$line" in
|
||||||
rootfstype=*) root_type="${line#*=}" ;;
|
rootfstype=*) root_type="${line#*=}" ;;
|
||||||
rootflags=*) root_opts="${line#*=}" ;;
|
rootflags=*) root_opts="${line#*=}" ;;
|
||||||
debug=1) set -x ;;
|
debug=1) set -x ;;
|
||||||
ro | rw) rorw="-o $line" ;;
|
ro | rw) rorw="-o $line" ;;
|
||||||
--*) init_args="${cmdline#*-- }"; break ;;
|
--*) init_args="${cmdline#*-- }"; break ;;
|
||||||
*=*) command export "$line" ;;
|
*=*) command export "$line" ;;
|
||||||
*) command export "${line}=1" ;;
|
*) command export "${line}=1" ;;
|
||||||
esac 2> /dev/null || :; done
|
esac 2> /dev/null || :; done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user