Add docker-init, move the alsa autostart script.

This commit is contained in:
fewtarius 2023-04-23 01:14:21 +00:00
parent 057a39e036
commit 809deb7768
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 2 additions and 39 deletions

View file

@ -1,37 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
tocon "Configuring audio..."
# Revert to stored setting when bluetooth was still selected at last shutdown.
# This is a workaround - headsets that auto-connect at boot tend to be
# unreliable, so for now it's better to force a manual reconnect.
LAST_AUDIO_DEVICE=$(set-audio get)
if [[ "${LAST_AUDIO_DEVICE}" =~ ^Device.* ]]
then
set-audio restore
fi
if [ ! -e "/storage/.config/asound.conf" ]
then
set-audio set "DEFAULT (SYSTEM PROVIDED)"
fi
if [ ! -e "/storage/.config/asound.state" ] && [ -e /usr/config/asound.state ]
then
cp /usr/config/asound.state /storage/.config
fi
# Initialize sound using the state if available.
if [ -e "/storage/.config/asound.state" ]
then
alsactl restore -f /storage/.config/asound.state
fi
PREAMP=$(get_setting "audio.preamp" 2>/dev/null)
amixer -M set Pre-Amp -- ${PREAMP}%
VOL=$(get_setting "audio.volume" 2>/dev/null)
amixer -M set "${DEVICE_AUDIO_MIXER}" ${VOL}%

View file

@ -17,6 +17,6 @@ pre_configure_target(){
sed -i "s|@tini_VERSION_GIT@| - git.${PKG_VERSION}|" ${PKG_BUILD}/src/tiniConfig.h.in
}
makeinstall_target() {
:
post_makeinstall_target() {
ln -sf /usr/bin/tini-static ${INSTALL}/usr/bin/docker-init
}