From 809deb776831c9bacdfa08ca59a953921564ea32 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sun, 23 Apr 2023 01:14:21 +0000 Subject: [PATCH] Add docker-init, move the alsa autostart script. --- packages/jelos/autostart/005-alsa | 37 ------------------------ packages/services/docker/tini/package.mk | 4 +-- 2 files changed, 2 insertions(+), 39 deletions(-) delete mode 100755 packages/jelos/autostart/005-alsa diff --git a/packages/jelos/autostart/005-alsa b/packages/jelos/autostart/005-alsa deleted file mode 100755 index 220abebd6..000000000 --- a/packages/jelos/autostart/005-alsa +++ /dev/null @@ -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}% diff --git a/packages/services/docker/tini/package.mk b/packages/services/docker/tini/package.mk index ec5520e4d..4a13d5e8e 100644 --- a/packages/services/docker/tini/package.mk +++ b/packages/services/docker/tini/package.mk @@ -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 }