From patchwork Wed Mar 27 05:15: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: 7680 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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V4FHn5G8bz3wkd for ; Wed, 27 Mar 2024 05:15:49 +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 4V4FHl3HP4z5V2; Wed, 27 Mar 2024 05:15:47 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4FHl1DtRz30VB; Wed, 27 Mar 2024 05:15:47 +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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V4FHh3QMZz2xTK for ; Wed, 27 Mar 2024 05:15:44 +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 4V4FHg1lGZz3VP; Wed, 27 Mar 2024 05:15:43 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711516543; 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=FN8HRUigY5GUgOhUV+soB9e+k/YiFWGzCGXxtUdscKQ=; b=xRMkzisxMN1U84bCULw94XfuGkp48HiEA+KqgbUXvU6hyDSl4yx94U6OfOtlg2jlwwMCzT nuMeWkkbwDPSVNBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711516543; 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=FN8HRUigY5GUgOhUV+soB9e+k/YiFWGzCGXxtUdscKQ=; b=ntWBKuaMmHDt/0PIJd6Z3D2yqvqDLugYNUK3oZvgeJGuoZEfInktkSnEA1Ba8+9zHcJO3C 9FJg8jfKIWrJ5wtuq94D4p/0YrvYcIgg/2kXJYRZyD/2OKmugfeTw1phl6HZa2nKIcC9d3 Ir+qvnUD5AOMjRBz2yHc7WeRaQW3KbPqBAYGoO7J0uswnV3t5LMFsbC2iesQp7NWENTq97 KyuWP9s5COTQYreuFfYgbN5pDDfioBcYNgMW4BaSa8ee9NAmkGokRRUI7zB3oVR6scaupu IZelS5G4lMIQGYs6obBciFJ0t1BvA2pHlutNohu3RwDxhD8KBmCDjLVhsxbHEQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/4] initscripts: Add generic function to get the filesystem type of a volume Date: Wed, 27 Mar 2024 06:15:17 +0100 Message-Id: <20240327051520.8231-1-stefan.schantl@ipfire.org> In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 5ZHGFLX56U4ICZWL2IXI2474QF7QVT42 X-Message-ID-Hash: 5ZHGFLX56U4ICZWL2IXI2474QF7QVT42 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 --- src/initscripts/system/functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 5a26aef45..0fa825000 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 + + echo "$(stat -f --format="%T" ${1})" +} From patchwork Wed Mar 27 05:15: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: 7681 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 4V4FHq510Hz3wkd for ; Wed, 27 Mar 2024 05:15:51 +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 4V4FHl69Z9z5XX; Wed, 27 Mar 2024 05:15:47 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4FHl2gPWz30VV; Wed, 27 Mar 2024 05:15:47 +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 4V4FHh412Qz2xTK for ; Wed, 27 Mar 2024 05:15:44 +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 4V4FHh1BsPz5V2; Wed, 27 Mar 2024 05:15:44 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711516544; 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=7Nye9ztIyd8V5afdJmIbhZJAmQdDce3CxjWg9dEYA7Qy19lmWDHWyNAdnE7dpAgCfiwwOS d8Bjv+HNjlxwKzBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711516544; 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=IhNL/7M6rNQJKEDn5m99HARFfY+Uelk6AtKMtU7yph3KygJTw5bdyo/C/tmM+VyRGmq9qq tVzcoPakgAibQ5uIu/VJeLs6zsmJ81hyu9U8soj41F4kY8HhARV6NUpRbh+K7MegSldBWP n4QhrNFp9CLOeePa/Wfp/CPR+MQC+c2TyUHWlaOjDdOedGyOseeUSaxXhvOoJT0iPNFUE5 m+EpjPrksDZDo78VPNmq78iYqXnpLck8ozW6myQ5Xk1emICBQnhCOrzZQhuExpivxQQ+8l SufgdfGKRVfJ1uV12Qt6GxiqoaPvDz+63L3wPxO0nO1ctoKOmt+EFihFd+D7ww== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/4] grub-btrfsd: Use generic volume_fs_type function for FS detection Date: Wed, 27 Mar 2024 06:15:18 +0100 Message-Id: <20240327051520.8231-2-stefan.schantl@ipfire.org> In-Reply-To: <20240327051520.8231-1-stefan.schantl@ipfire.org> References: <20240327051520.8231-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 66EC4RQIW26VMUYDEBVGIOYDCAX7F357 X-Message-ID-Hash: 66EC4RQIW26VMUYDEBVGIOYDCAX7F357 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 --- 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 05:15: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: 7682 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 4V4FHr74mFz3wkd for ; Wed, 27 Mar 2024 05:15:52 +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 4V4FHn4dsPz5Vm; Wed, 27 Mar 2024 05:15:49 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4FHn48V0z30Gj; Wed, 27 Mar 2024 05:15:49 +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 4V4FHj0tBcz30Gj for ; Wed, 27 Mar 2024 05:15:45 +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 4V4FHh4rsWz5VJ; Wed, 27 Mar 2024 05:15:44 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711516545; 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=2TYXQlP5WDrJFtqufyckGf7xI+qHckK/sGkL2WT4PcpD/KJ5hF7BOds+nSY1gX9/fSVT1z ASwSmtSE3c2HCGAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711516545; 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=XsHz0bQWEjat638z8S0Q4fPIQ3znib5F1S8bmKjtjFaOJgBxhIdWvGQ11Fu7Ezf3RFPRFp VSloLRZTCade49vxt9npXtvmIbYyyflDMfoh3ngA2A8pHFsPkqXng4ex12KQtYhFGnffQv HYNCCF7IpfgDQF1ZODMOgJpwMpqj5T2lmV3uVpsj0L7Dsgva5rOOl6Af7Dq416xdZ7N8xb W/rV1KLoVve9lS+E5NzL024t5+rh16WQr5moqO/OZsOn5E2CB3e8kYnPvVat4sqiX6N/lZ Raz65OlMjJ9AtJJsaBqGdsT1d5k8ytzUxE4uz2VJB5tlHLmEAq+ljjxmvklstg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/4] grub-btrfsd: Adjust displayed starting message Date: Wed, 27 Mar 2024 06:15:19 +0100 Message-Id: <20240327051520.8231-3-stefan.schantl@ipfire.org> In-Reply-To: <20240327051520.8231-1-stefan.schantl@ipfire.org> References: <20240327051520.8231-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: IVDDHEQLX2TPSDXA5GPO2L5BQTRJKIUC X-Message-ID-Hash: IVDDHEQLX2TPSDXA5GPO2L5BQTRJKIUC 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 --- 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 05:15: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: 7683 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 4V4FHs4Hn4z3wxX for ; Wed, 27 Mar 2024 05:15:53 +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 4V4FHp1tsXz5Yr; Wed, 27 Mar 2024 05:15:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V4FHn5Phlz30VB; Wed, 27 Mar 2024 05:15:49 +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 4V4FHj4FtBz30Gj for ; Wed, 27 Mar 2024 05:15:45 +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 4V4FHj1RMWz5WG; Wed, 27 Mar 2024 05:15:45 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711516545; 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=hNdPL+VwBUbN3gYd19Zw+vuTZunVobPXdzOXlSe4JEQ=; b=3wsqW1iYFAnkHkcqhMJ72HjjsIumH2/QJfrfScc6ZaKQ8jx6SCiGOo+T4sZ6ADSDD+Rxob WJ1GXn51h3n+/VBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711516545; 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=hNdPL+VwBUbN3gYd19Zw+vuTZunVobPXdzOXlSe4JEQ=; b=b1j6W3iHbW98qh1MsQLVaHk29KbrrB3jrc/PhxF2pD3VRuO35KyfRBXhbxUi3s8pIO+Ei4 QIF05YlbsZdVZ2S5T2aNJY7VdTn9/a/m9nuKtBFrezqd7vB7cUZLIsPW0H8ZLs7OmoxMqB ItdHoDcBR+xhXCCVlwWTzZC4TC6pmIgek3vWJ+5faWAhzxhZNfPQh+cSrbM26PHm017BuD RwM81ZAsAVaXkbL5WhC0cEPl6ezXocHKfGbstUvPZctl9Wx5WI7YPG2qd/OZ4PoTVItJEo 3tNegJKFjMUk2hfhZqzDneaaleZkmNHEHm2dYZriAapO8x9e35PA2dLlfkxLNg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 4/4] grub-btrfsd: Drop redundant used PIDFILE mechanism Date: Wed, 27 Mar 2024 06:15:20 +0100 Message-Id: <20240327051520.8231-4-stefan.schantl@ipfire.org> In-Reply-To: <20240327051520.8231-1-stefan.schantl@ipfire.org> References: <20240327051520.8231-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: GRXNJTZAJ4LEUEITJMHIOUXRKLOUF6GW X-Message-ID-Hash: GRXNJTZAJ4LEUEITJMHIOUXRKLOUF6GW 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 --- src/initscripts/system/grub-btrfsd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/initscripts/system/grub-btrfsd b/src/initscripts/system/grub-btrfsd index 26760f9be..5981c3a0a 100644 --- a/src/initscripts/system/grub-btrfsd +++ b/src/initscripts/system/grub-btrfsd @@ -33,15 +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 + killproc -p /usr/bin/grub-btrfsd sleep 1; ;;