Browse Source

style: shfmt pre correction

master
Harald Hoyer 3 years ago committed by Harald Hoyer
parent
commit
560402c3dc
  1. 3
      dracut-bash-completion.sh
  2. 2
      dracut-catimages.sh
  3. 4
      dracut.sh
  4. 5
      lsinitrd-bash-completion.sh
  5. 2
      modules.d/00systemd/module-setup.sh
  6. 9
      modules.d/02systemd-networkd/module-setup.sh
  7. 7
      modules.d/90dmsquash-live/dmsquash-live-root.sh
  8. 14
      modules.d/95iscsi/module-setup.sh
  9. 2
      modules.d/98dracut-systemd/module-setup.sh
  10. 13
      test/TEST-02-SYSTEMD/systemd-analyze.sh
  11. 7
      test/TEST-04-FULL-SYSTEMD/test.sh
  12. 48
      test/TEST-99-RPM/test.sh

3
dracut-bash-completion.sh

@ -32,8 +32,7 @@ _dracut() { @@ -32,8 +32,7 @@ _dracut() {
--xz --zstd --no-compress --gzip --list-modules --show-modules --keep
--printsize --regenerate-all --noimageifnotneeded --early-microcode
--no-early-microcode --print-cmdline --reproducible --uefi'

[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
--omit-drivers --modules --omit --drivers --filesystems --install
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix

2
dracut-catimages.sh

@ -30,7 +30,7 @@ derror() { @@ -30,7 +30,7 @@ derror() {
}

usage() {
# 80x25 linebreak here ^
# 80x25 linebreak here ^
cat << EOF
Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
Creates initial ramdisk image by concatenating several images from the command

4
dracut.sh

@ -45,7 +45,7 @@ usage() { @@ -45,7 +45,7 @@ usage() {
. "$dracutbasedir"/dracut-version.sh
fi

# 80x25 linebreak here ^
# 80x25 linebreak here ^
cat << EOF
Usage: $dracut_cmd [OPTION]... [<initramfs> [<kernel-version>]]

@ -71,7 +71,7 @@ long_usage() { @@ -71,7 +71,7 @@ long_usage() {
. "$dracutbasedir"/dracut-version.sh
fi

# 80x25 linebreak here ^
# 80x25 linebreak here ^
cat << EOF
Usage: $dracut_cmd [OPTION]... [<initramfs> [<kernel-version>]]


5
lsinitrd-bash-completion.sh

@ -24,9 +24,8 @@ __contains_word () { @@ -24,9 +24,8 @@ __contains_word () {
_lsinitrd() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
[STANDALONE]='-s --size -h --help'

[ARG]='-f --file -k --kver'
[STANDALONE]='-s --size -h --help'
[ARG]='-f --file -k --kver'
)

# shellcheck disable=SC2086

2
modules.d/00systemd/module-setup.sh

@ -242,7 +242,7 @@ install() { @@ -242,7 +242,7 @@ install() {
rescue.target \
systemd-ask-password-console.service \
systemd-ask-password-plymouth.service \
; do
${NULL}; do
[[ -f "$systemdsystemunitdir"/$i ]] || continue
$SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
done

9
modules.d/02systemd-networkd/module-setup.sh

@ -49,17 +49,18 @@ install() { @@ -49,17 +49,18 @@ install() {
# grep '^systemd-timesync:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"

_arch=${DRACUT_ARCH:-$(uname -m)}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
inst_libdir_file \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_myhostname.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_resolve.so.*"

# systemd-timesyncd.service
for i in \
systemd-networkd-wait-online.service \
systemd-networkd.service \
systemd-networkd.socket
# systemd-timesyncd.service
do
systemd-networkd.socket \
${NULL}; do
$SYSTEMCTL -q --root "$initdir" enable "$i"
done
}

7
modules.d/90dmsquash-live/dmsquash-live-root.sh

@ -64,7 +64,12 @@ det_img_fs() { @@ -64,7 +64,12 @@ det_img_fs() {

modprobe squashfs
CMDLINE=$(getcmdline)
for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done
for arg in $CMDLINE; do
case $arg in
ro | rw) liverw=$arg ;;
esac
done

# mount the backing of the live image first
mkdir -m 0755 -p /run/initramfs/live
if [ -f $livedev ]; then

14
modules.d/95iscsi/module-setup.sh

@ -225,16 +225,16 @@ install() { @@ -225,16 +225,16 @@ install() {
iscsiadm iscsid

for i in \
iscsid.socket \
iscsiuio.socket \
; do
iscsid.socket \
iscsiuio.socket \
${NULL}; do
$SYSTEMCTL -q --root "$initdir" enable "$i"
done

for i in \
iscsid.service \
iscsiuio.service \
; do
iscsid.service \
iscsiuio.service \
${NULL}; do
$SYSTEMCTL -q --root "$initdir" add-wants basic.target "$i"
done


2
modules.d/98dracut-systemd/module-setup.sh

@ -47,7 +47,7 @@ install() { @@ -47,7 +47,7 @@ install() {
dracut-pre-pivot.service \
dracut-pre-trigger.service \
dracut-pre-udev.service \
; do
${NULL}; do
inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}"
$SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i"
done

13
test/TEST-02-SYSTEMD/systemd-analyze.sh

@ -4,12 +4,13 @@ cp /usr/bin/true /usr/bin/man @@ -4,12 +4,13 @@ cp /usr/bin/true /usr/bin/man

for i in \
sysinit.target \
basic.target \
initrd-fs.target \
initrd.target \
initrd-switch-root.target \
emergency.target \
shutdown.target; do
basic.target \
initrd-fs.target \
initrd.target \
initrd-switch-root.target \
emergency.target \
shutdown.target \
${NULL}; do
if ! systemd-analyze verify $i; then
warn "systemd-analyze verify $i failed"
poweroff

7
test/TEST-04-FULL-SYSTEMD/test.sh

@ -172,9 +172,10 @@ EOF @@ -172,9 +172,10 @@ EOF
# install basic keyboard maps and fonts
for i in \
/usr/lib/kbd/consolefonts/eurlatgr* \
/usr/lib/kbd/keymaps/{legacy/,/}include/* \
/usr/lib/kbd/keymaps/{legacy/,/}i386/include/* \
/usr/lib/kbd/keymaps/{legacy/,/}i386/qwerty/us.*; do
/usr/lib/kbd/keymaps/{legacy/,/}include/* \
/usr/lib/kbd/keymaps/{legacy/,/}i386/include/* \
/usr/lib/kbd/keymaps/{legacy/,/}i386/qwerty/us.* \
${NULL}; do
[[ -f $i ]] || continue
inst $i
done

48
test/TEST-99-RPM/test.sh

@ -68,30 +68,30 @@ test_run() { @@ -68,30 +68,30 @@ test_run() {
#!/bin/bash
set -x
export LC_MESSAGES=C
rpm -Va |& \
grep -F \
'85-display-manager.preset| /run| /var| /usr/lib/variant| /etc/machine-id| /etc/systemd/system/dbus-org.freedesktop.network1.service| /etc/systemd/system/dbus-org.freedesktop.resolve1.service| /etc/udev/hwdb.bin| /usr/share/info/dir.old' \
&> /test.output

find / -xdev -type f -not -path '/var/*' \
-not -path '/usr/lib/modules/*/modules.*' \
-not -path '/etc/*-' \
-not -path '/etc/.pwd.lock' \
-not -path '/run/mount/utab' \
-not -path '/test.sh' \
-not -path '/test.output' \
-not -path '/etc/nsswitch.conf.bak' \
-not -path '/etc/iscsi/initiatorname.iscsi' \
-not -path '/boot/*0-rescue*' \
-not -path '/usr/share/mime/*' \
-not -path '/etc/crypto-policies/*' \
-not -path '/dev/null' \
-not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \
-not -path "/boot/\$(cat /etc/machine-id)/*" \
-not -path '/etc/openldap/certs/*' \
-not -path '/etc/dnf/*' \
-print0 | xargs -0 rpm -qf | \
grep -F 'not owned' &>> /test.output || :
rpm -Va 2>&1 | \\
grep -F \\
'85-display-manager.preset| /run| /var| /usr/lib/variant| /etc/machine-id| /etc/systemd/system/dbus-org.freedesktop.network1.service| /etc/systemd/system/dbus-org.freedesktop.resolve1.service| /etc/udev/hwdb.bin| /usr/share/info/dir.old' \\
&> /test.output

find / -xdev -type f -not -path '/var/*' \\
-not -path '/usr/lib/modules/*/modules.*' \\
-not -path '/etc/*-' \\
-not -path '/etc/.pwd.lock' \\
-not -path '/run/mount/utab' \\
-not -path '/test.sh' \\
-not -path '/test.output' \\
-not -path '/etc/nsswitch.conf.bak' \\
-not -path '/etc/iscsi/initiatorname.iscsi' \\
-not -path '/boot/*0-rescue*' \\
-not -path '/usr/share/mime/*' \\
-not -path '/etc/crypto-policies/*' \\
-not -path '/dev/null' \\
-not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \\
-not -path "/boot/\$(cat /etc/machine-id)/*" \\
-not -path '/etc/openldap/certs/*' \\
-not -path '/etc/dnf/*' \\
-print0 | xargs -0 rpm -qf | \\
grep -F 'not owned' &>> /test.output || :
exit 0
EOF


Loading…
Cancel
Save