From f256f5141f4f5dc8c75bcd328b9c950620711af2 Mon Sep 17 00:00:00 2001 From: d-two <32079446+d-two@users.noreply.github.com> Date: Thu, 20 Apr 2023 17:30:33 +0200 Subject: [PATCH] Delete 50-gid-video --- tvheadend/rootfs/etc/cont-init.d/50-gid-video | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 tvheadend/rootfs/etc/cont-init.d/50-gid-video diff --git a/tvheadend/rootfs/etc/cont-init.d/50-gid-video b/tvheadend/rootfs/etc/cont-init.d/50-gid-video deleted file mode 100644 index ea2bc1a..0000000 --- a/tvheadend/rootfs/etc/cont-init.d/50-gid-video +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/with-contenv bash - -FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null) - -for i in $FILES -do - VIDEO_GID=$(stat -c '%g' "$i") - if id -G abc | grep -qw "$VIDEO_GID"; then - touch /groupadd - else - if [ ! "${VIDEO_GID}" == '0' ]; then - VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') - if [ -z "${VIDEO_NAME}" ]; then - VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-z0-9' | head -c8)" - groupadd "$VIDEO_NAME" - groupmod -g "$VIDEO_GID" "$VIDEO_NAME" - fi - usermod -a -G "$VIDEO_NAME" abc - touch /groupadd - fi - fi -done - -if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then - usermod -a -G root abc -fi