public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jing Luo via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [pve-devel] [PATCH] rust-proxmox-backup: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:12 +0900	[thread overview]
Message-ID: <mailman.81.1742657164.359.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20250322152004.1646886-1-jing@jing.rocks>

[-- Attachment #1: Type: message/rfc822, Size: 6924 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH] rust-proxmox-backup: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:12 +0900
Message-ID: <20250322152004.1646886-5-jing@jing.rocks>

"/var/lock" is deprecated.

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 pbs-config/src/network/mod.rs    | 2 +-
 src/tape/drive/mod.rs            | 2 +-
 src/tools/shared_rate_limiter.rs | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pbs-config/src/network/mod.rs b/pbs-config/src/network/mod.rs
index 21ad9943..55d4e556 100644
--- a/pbs-config/src/network/mod.rs
+++ b/pbs-config/src/network/mod.rs
@@ -444,7 +444,7 @@ impl NetworkConfig {
 
 pub const NETWORK_INTERFACES_FILENAME: &str = "/etc/network/interfaces";
 pub const NETWORK_INTERFACES_NEW_FILENAME: &str = "/etc/network/interfaces.new";
-pub const NETWORK_LOCKFILE: &str = "/var/lock/pve-network.lck";
+pub const NETWORK_LOCKFILE: &str = "/run/lock/pve-network.lck";
 
 pub fn lock_config() -> Result<BackupLockGuard, Error> {
     open_backup_lockfile(NETWORK_LOCKFILE, None, true)
diff --git a/src/tape/drive/mod.rs b/src/tape/drive/mod.rs
index 36c8627a..ecc038f3 100644
--- a/src/tape/drive/mod.rs
+++ b/src/tape/drive/mod.rs
@@ -596,7 +596,7 @@ pub struct DeviceLockGuard {
 }
 
 // Uses systemd escape_unit to compute a file name from `device_path`, the try
-// to lock `/var/lock/<name>`.
+// to lock `/run/lock/<name>`.
 fn open_device_lock(device_path: &str) -> Result<std::fs::File, Error> {
     let lock_name = proxmox_systemd::escape_unit(device_path, true);
 
diff --git a/src/tools/shared_rate_limiter.rs b/src/tools/shared_rate_limiter.rs
index 8c9e6086..5cda02b7 100644
--- a/src/tools/shared_rate_limiter.rs
+++ b/src/tools/shared_rate_limiter.rs
@@ -68,7 +68,7 @@ pub struct SharedRateLimiter {
 impl SharedRateLimiter {
     /// Creates a new mmap'ed instance.
     ///
-    /// Data is mapped in `/var/run/proxmox-backup/shmem/tbf/<name>` using
+    /// Data is mapped in `/run/proxmox-backup/shmem/tbf/<name>` using
     /// `TMPFS`.
     pub fn mmap_shmem(name: &str, rate: u64, burst: u64) -> Result<Self, Error> {
         let mut path = PathBuf::from(BASE_PATH);
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  parent reply	other threads:[~2025-03-22 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250322152004.1646886-1-jing@jing.rocks>
2025-03-22 15:17 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
2025-03-22 15:17 ` Jing Luo via pve-devel [this message]
2025-03-22 15:17 ` [pve-devel] [PATCH pve-cluster] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-common] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-guest-common] tree-wide: change " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-storage] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH qemu-server] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
     [not found] ` <20250322152004.1646886-2-jing@jing.rocks>
2025-03-24  8:02   ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Thomas Lamprecht
2025-03-24 11:41     ` Jing Luo via pve-devel
     [not found]     ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
2025-03-24 11:56       ` Thomas Lamprecht
2025-03-24 13:04         ` Jing Luo via pve-devel
     [not found]         ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
2025-03-24 13:11           ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.81.1742657164.359.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=jing@jing.rocks \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal