remove bashism in various boot scripts

When using dash as initramfs shell, the boot process is broken.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
master
Đoàn Trần Công Danh 2019-01-06 11:48:02 +07:00 committed by Harald Hoyer
parent 7e944c77c0
commit 09d2a1605b
5 changed files with 5 additions and 5 deletions

View File

@ -191,7 +191,7 @@ readkey() {
local device="$3"

# No mounting needed if the keyfile resides inside the initrd
if [ "/" == "$keydev" ]; then
if [ "/" = "$keydev" ]; then
local mntp=/
else
# This creates a unique single mountpoint for *, or several for explicitly

View File

@ -18,7 +18,7 @@ if getargbool 1 rd.luks -n rd_NO_LUKS && \
fi

# A keydev of '/' is treated as the initrd itself
if [ "/" == "$keydev" ]; then
if [ "/" = "$keydev" ]; then
[ -z "$luksdev" ] && luksdev='*'
echo "$luksdev:$keydev:$keypath" >> /tmp/luks.keys
continue

View File

@ -53,7 +53,7 @@ gpg_decrypt() {
--tries 3 --tty-echo-off

# Clean up the smartcard gpg-agent
if [ "${useSmartcard}" == "1" ]; then
if [ "${useSmartcard}" = "1" ]; then
GNUPGHOME="$gpghome" gpg-connect-agent 1>/dev/null killagent /bye
fi


View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
dcssblk_arg=$(getarg rd.dcssblk=)
if [ $? == 0 ];then
if [ $? = 0 ];then
info "Loading dcssblk segments=$dcssblk_arg"
modprobe dcssblk segments=$dcssblk_arg
fi

View File

@ -38,7 +38,7 @@ rsyslog_config() {
[ -f /tmp/syslog.conf ] && read conf < /tmp/syslog.conf
[ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf

if [ $type == "rsyslogd" ]; then
if [ $type = "rsyslogd" ]; then
template=/etc/templates/rsyslog.conf
if [ -n "$server" ]; then
rsyslog_config "$server" "$template" "$filters" > $conf