From patchwork Wed Mar 27 19:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7685 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSS5Z1Vz3wv4 for ; Wed, 27 Mar 2024 19:39:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V4cSQ05ghz18H; Wed, 27 Mar 2024 19:39:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4cSP4qK8z30ZL; Wed, 27 Mar 2024 19:39:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSL6mJFz2yXQ for ; Wed, 27 Mar 2024 19:39:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V4cSK4nLWz15g; Wed, 27 Mar 2024 19:39:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711568370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sOCJ0UTWUx/8W6MWvCDTplAKRviOs3kmco2GUiymofQ=; b=SnvwjS+IYFyYEwqQ6X/bYRNLJD6t6wRHC1der/yPacu/MGYGXQPmVuDOt8C8GdmWrzAfbC shluQdRZex5F7MDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711568370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sOCJ0UTWUx/8W6MWvCDTplAKRviOs3kmco2GUiymofQ=; b=OBKM7O9O8e9+1W75xrtBsH2Si+ke6Knz/oSOSHWEivGULJvhVTRlv80ImzFKOt1z+lJTUB Cu18tySaMxCAZZyfZ18YkpHTtj+52Ig8EBg8ZW+mSFH802aXxT5Oc+WbtuDu4tiR63Td1W KE19OB2q4341nkjqA3c3MYq3cmWcXUQVp0H7vFZ9398MGubYnpTEc27Ym7FGnKAE85p+4b kgVUidAP0c1MZPAHDSaHT0jGGlyORsta4qqfCx8FbPnzfd7D2/9JQOakEQpk9F/3Ywo/XR bJh/HiNCM9QCO+0Dul897q6hHzZ1gTFSDE2OKpdPwDyMO7d3pExFGf9FDCo3Eg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCHv2 1/4] initscripts: Add generic function to get the filesystem type of a volume Date: Wed, 27 Mar 2024 20:39:17 +0100 Message-Id: <20240327193920.14311-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: YISBZPAQ3PJEQEBJHCL7RSKG4HJYF4IH X-Message-ID-Hash: YISBZPAQ3PJEQEBJHCL7RSKG4HJYF4IH X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- src/initscripts/system/functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 5a26aef45..b610143ab 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -883,3 +883,11 @@ running_on_oci() { # We are not running on OCI return 1 } + +volume_fs_type() { + if [ ! -d "${1}" ]; then + return + fi + + stat -f --format="%T" ${1} +} From patchwork Wed Mar 27 19:39:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7686 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSV584Bz3wv4 for ; Wed, 27 Mar 2024 19:39:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V4cSQ4CTgz2VY; Wed, 27 Mar 2024 19:39:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4cSP6pLmz32Lg; Wed, 27 Mar 2024 19:39:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSM3GmXz2yXQ for ; Wed, 27 Mar 2024 19:39:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V4cSM0NhZz18H; Wed, 27 Mar 2024 19:39:30 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711568371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PebdlhCWpJY73rGPC9uWejCpcnNH8Yscbk0zd4B/fEQ=; b=eBjsZz1VXned6Mj11fdidnskvUoBGgkjd8rKlMqALIDHFGzuPY16ncM6xEaPN3lsNiwJLM FMKUPn9qqWOZA7Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711568371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PebdlhCWpJY73rGPC9uWejCpcnNH8Yscbk0zd4B/fEQ=; b=QLNMkzFD2DxJTthxrYik27878qBSFyZdmwCnnZ03Yp0cLWkTGsmt/w27vo2Kkh/MYiccQ8 NGm9xcmxaR7CXGOSdb1ctpNn2ItxKB48WmzF4AKNqx46b2FPyPJQsStzGUyg5MKG8k7Sz6 PMqdEOZK7RxZlk+WYkj1UccG6mwH3tKT3E0pkCn9tGE19SqR2Hbbnk01ml6k4Ut8VQj9hj 9YngI2vGpUBZ+KD+5ctrqBU2GkfbJ34OadY0FX9VDCP5vFY3xGqjLWaWM2LNrxYeYsKmWk dQS+O8EXz7HNzwu8Z5MrCs/ULuEAQtMwKn4xxirVdwpXN1TGMlC4KpRHcm7O9Q== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCHv2 2/4] grub-btrfsd: Use generic volume_fs_type function for FS detection Date: Wed, 27 Mar 2024 20:39:18 +0100 Message-Id: <20240327193920.14311-2-stefan.schantl@ipfire.org> In-Reply-To: <20240327193920.14311-1-stefan.schantl@ipfire.org> References: <20240327193920.14311-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: CVNUDR2MKYVVGFU7SVRE4HQA63RZUZUS X-Message-ID-Hash: CVNUDR2MKYVVGFU7SVRE4HQA63RZUZUS X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- src/initscripts/system/grub-btrfsd | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/initscripts/system/grub-btrfsd b/src/initscripts/system/grub-btrfsd index dc5e32ad4..90582b1b1 100644 --- a/src/initscripts/system/grub-btrfsd +++ b/src/initscripts/system/grub-btrfsd @@ -25,21 +25,18 @@ SNAPSHOTDIR="/.snapshots" PIDFILE="/run/grub-btrfsd.pid" -root_is_btrfs() { - [ "$(stat -f --format="%T" /)" == "btrfs" ] || return 1 - - return 0 -} - case "$1" in start) - root_is_btrfs || exit 0 + root_fs_type=$(volume_fs_type "/") - boot_mesg "Starting Grub/Btrfs snapshot manager..." - loadproc -b -p "$PIDFILE" /usr/bin/grub-btrfsd --syslog "$SNAPSHOTDIR" + case "$root_fs_type" in + btrfs) - # Store the gained PID to the defined pidfile - echo "$!" > "$PIDFILE" + boot_mesg "Starting Grub/Btrfs snapshot manager..." + loadproc -b -p "$PIDFILE" /usr/bin/grub-btrfsd --syslog "$SNAPSHOTDIR" + echo "$!" > "$PIDFILE" + ;; + esac ;; stop) From patchwork Wed Mar 27 19:39:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7687 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSW0rWdz3ww6 for ; Wed, 27 Mar 2024 19:39:39 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V4cSQ4bZqz2Zx; Wed, 27 Mar 2024 19:39:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4cSQ2GSCz30Gn; Wed, 27 Mar 2024 19:39:34 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSN3M0Hz30Tr for ; Wed, 27 Mar 2024 19:39:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V4cSM3t2nz19N; Wed, 27 Mar 2024 19:39:31 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711568371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iGzokAEgS2XhSckoM9W2ho5hEu9jh1x6Fl9oagnjCxM=; b=PnSACApVWR5vjRKjzpTofGs6q2oMDDsW3B4w1Rc6upOnB2KKgeUtHk338bmy3AHd/qq3cS ZyAWlF52Bp5Mu3DA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711568371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iGzokAEgS2XhSckoM9W2ho5hEu9jh1x6Fl9oagnjCxM=; b=KmGNKy/DH7DkW1UbXgYn2+ek9HcqatJvgVInEawfku+1RU22bHQTZAkKfxtszcvx5YMZRu 59IoZx9qfQc62SktF4+f6S8M/rcvUAkPp6uDPXukZjsjEwkkK5wQ6GKh21E7gd2o8/DR4I VYz0IAF/wsq4Ol8TRjg8G0djzqM+LcqSzodP2R3cYmXoJOtzuAcrC2eVdlekBIHVDjKQgy sFrq4eFEgTP0tadbiC0YncI0SxGyqf/keUblzTtiydRBDS6iOLd/qYO+On6WDdLjXxv6FW s6eMbpPx7mqGXEOu7MwLdySHuYszuN0PMIFv9m4rhRjNnRwyY4z65ELQGuWMug== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCHv2 3/4] grub-btrfsd: Adjust displayed starting message Date: Wed, 27 Mar 2024 20:39:19 +0100 Message-Id: <20240327193920.14311-3-stefan.schantl@ipfire.org> In-Reply-To: <20240327193920.14311-1-stefan.schantl@ipfire.org> References: <20240327193920.14311-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: XHWPTUBJTLRSY6NMMEBJFHX4L2AOEBF2 X-Message-ID-Hash: XHWPTUBJTLRSY6NMMEBJFHX4L2AOEBF2 X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- src/initscripts/system/grub-btrfsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initscripts/system/grub-btrfsd b/src/initscripts/system/grub-btrfsd index 90582b1b1..26760f9be 100644 --- a/src/initscripts/system/grub-btrfsd +++ b/src/initscripts/system/grub-btrfsd @@ -32,7 +32,7 @@ case "$1" in case "$root_fs_type" in btrfs) - boot_mesg "Starting Grub/Btrfs snapshot manager..." + boot_mesg "Starting GRUB/Btrfs Daemon..." loadproc -b -p "$PIDFILE" /usr/bin/grub-btrfsd --syslog "$SNAPSHOTDIR" echo "$!" > "$PIDFILE" ;; From patchwork Wed Mar 27 19:39:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7688 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSW6t1Mz3wv4 for ; Wed, 27 Mar 2024 19:39:39 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V4cSS57Zxz5VV; Wed, 27 Mar 2024 19:39:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4cSS4LKcz30V2; Wed, 27 Mar 2024 19:39:36 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V4cSP2zbcz30BS for ; Wed, 27 Mar 2024 19:39:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V4cSN4wCXz15g; Wed, 27 Mar 2024 19:39:32 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711568372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kusAY9nYI+uwSvanxjylYEC5FsVEPOGqMUkv8s93kbU=; b=EWTG33OA/NEIiMwA2TyieMSozw7PX1XoZB3VUWr26j5YGXhJ6cJjsMWpI5+soiLLJSTNwC tEhH0UEDj6hQtzCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711568372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kusAY9nYI+uwSvanxjylYEC5FsVEPOGqMUkv8s93kbU=; b=U/19ot1kC99Q0iwDbrTi9R+XjoNtYiqpXFxdPxT+UcZpO/Gy0PmCLBGtYYj0/iS5uwciVP yJTZQJbCnKhTmsUUx2m31Yo03yZQc8JjQiu8I1ZacTQ6DLhVNRXvc6wPx2C0T3lrEraBBN BC5AmSUG/22FM3smLkWMNnMbnlCKBduAqVIcbXuMQW/lq1ua3sOnfX0sfuc4zzUOxDvGz1 S3QK0DHAJw7EcoTdNwV622Na4bo/ORBUfh3dj0XmTrK+xb6+Ti/DezSWUo5j9xzUXgXl/T LfUkte8zHkl4r8dyLLBAy11x5OW+JSNDg31Kq2UY7SiGaFzCO9Uhv7eKqg/tBQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCHv2 4/4] grub-btrfsd: Drop redundant used PIDFILE mechanism Date: Wed, 27 Mar 2024 20:39:20 +0100 Message-Id: <20240327193920.14311-4-stefan.schantl@ipfire.org> In-Reply-To: <20240327193920.14311-1-stefan.schantl@ipfire.org> References: <20240327193920.14311-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 4DGHEBJFYY4A5LJS7UUV55HCJEWZHXF7 X-Message-ID-Hash: 4DGHEBJFYY4A5LJS7UUV55HCJEWZHXF7 X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This case is already covered by the PID mechanism of the used functions Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- src/initscripts/system/grub-btrfsd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/initscripts/system/grub-btrfsd b/src/initscripts/system/grub-btrfsd index 26760f9be..49073a807 100644 --- a/src/initscripts/system/grub-btrfsd +++ b/src/initscripts/system/grub-btrfsd @@ -33,16 +33,14 @@ case "$1" in btrfs) boot_mesg "Starting GRUB/Btrfs Daemon..." - loadproc -b -p "$PIDFILE" /usr/bin/grub-btrfsd --syslog "$SNAPSHOTDIR" - echo "$!" > "$PIDFILE" + loadproc -b /usr/bin/grub-btrfsd --syslog "$SNAPSHOTDIR" ;; esac ;; stop) boot_mesg "Stopping grub-btrfsd..." - killproc -p "$PIDFILE" /usr/bin/grub-btrfsd - sleep 1; + killproc /usr/bin/grub-btrfsd ;; restart)