From 8e96ed8556a43cd08b56c253f1ec577cc2e58055 Mon Sep 17 00:00:00 2001 From: Andrei Pozolotin Date: Wed, 1 Apr 2020 09:23:04 -0500 Subject: [PATCH] beeper service --- src/initrd-emergency.service | 2 +- src/initrd-emergency.target | 2 +- src/initrd-util-pc-beep.service | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/initrd-util-pc-beep.service diff --git a/src/initrd-emergency.service b/src/initrd-emergency.service index 4d77f19..46300f6 100644 --- a/src/initrd-emergency.service +++ b/src/initrd-emergency.service @@ -2,7 +2,7 @@ # Override Emergency Service -# TODO does not work +# TODO add ssh server dependency # the default reaction to several failed cryptsetup attempts is to isolate the emergency service # which results in loss of network and forced local interactive console - no good for ssh mode diff --git a/src/initrd-emergency.target b/src/initrd-emergency.target index 3c68334..f434dce 100644 --- a/src/initrd-emergency.target +++ b/src/initrd-emergency.target @@ -2,7 +2,7 @@ # Override Emergency Target -# TODO does not work +# TODO add ssh server dependency # the default reaction to several failed cryptsetup attempts is to isolate the emergency service # which results in loss of network and forced local interactive console - no good for ssh mode diff --git a/src/initrd-util-pc-beep.service b/src/initrd-util-pc-beep.service new file mode 100644 index 0000000..b3983d6 --- /dev/null +++ b/src/initrd-util-pc-beep.service @@ -0,0 +1,27 @@ +# This file is part of https://github.com/random-archer/mkinitcpio-systemd-tool + +# Provide PC Beeper sound during initramfs boot. + +# service dependencies: +# - https://www.archlinux.org/packages/extra/x86_64/beep/ + +[Unit] +Description=Initrd Beeper Service +ConditionPathExists=/etc/initrd-release +DefaultDependencies=no + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStartPre=/usr/bin/beep -f 700 -r 3 -d 50 -l 200 +ExecStart=/bin/true + +[Install] +WantedBy=sysinit.target + +[X-SystemdTool] + +# provision beeper components +# https://wiki.archlinux.org/index.php/PC_speaker#Beep +InitrdBinary=/usr/bin/beep +InitrdCall=add_module pcspkr