Skip to content

Commit

Permalink
Merge pull request #49 from random-archer/dev-beeper-service
Browse files Browse the repository at this point in the history
beeper service
  • Loading branch information
Andrei-Pozolotin authored Apr 1, 2020
2 parents 30ae541 + 8e96ed8 commit 6ac88ce
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/initrd-emergency.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/initrd-emergency.target
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions src/initrd-util-pc-beep.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6ac88ce

Please sign in to comment.