rename pbs-systemd to proxmox-systemd
This commit is contained in:
committed by
Thomas Lamprecht
parent
48109c5354
commit
84af82e8cf
@ -186,9 +186,9 @@ pub fn create_datastore_disk(
|
||||
|
||||
let mount_unit_name = create_datastore_mount_unit(&name, &mount_point, filesystem, &uuid_path)?;
|
||||
|
||||
pbs_systemd::reload_daemon()?;
|
||||
pbs_systemd::enable_unit(&mount_unit_name)?;
|
||||
pbs_systemd::start_unit(&mount_unit_name)?;
|
||||
proxmox_systemd::reload_daemon()?;
|
||||
proxmox_systemd::enable_unit(&mount_unit_name)?;
|
||||
proxmox_systemd::start_unit(&mount_unit_name)?;
|
||||
|
||||
if add_datastore {
|
||||
let lock = pbs_config::datastore::lock_config()?;
|
||||
@ -242,9 +242,9 @@ pub fn delete_datastore_disk(name: String) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
// disable systemd mount-unit
|
||||
let mut mount_unit_name = pbs_systemd::escape_unit(&path, true);
|
||||
let mut mount_unit_name = proxmox_systemd::escape_unit(&path, true);
|
||||
mount_unit_name.push_str(".mount");
|
||||
pbs_systemd::disable_unit(&mount_unit_name)?;
|
||||
proxmox_systemd::disable_unit(&mount_unit_name)?;
|
||||
|
||||
// delete .mount-file
|
||||
let mount_unit_path = format!("/etc/systemd/system/{}", mount_unit_name);
|
||||
@ -281,7 +281,7 @@ fn create_datastore_mount_unit(
|
||||
what: &str,
|
||||
) -> Result<String, Error> {
|
||||
|
||||
let mut mount_unit_name = pbs_systemd::escape_unit(&mount_point, true);
|
||||
let mut mount_unit_name = proxmox_systemd::escape_unit(&mount_point, true);
|
||||
mount_unit_name.push_str(".mount");
|
||||
|
||||
let mount_unit_path = format!("/etc/systemd/system/{}", mount_unit_name);
|
||||
|
@ -271,8 +271,8 @@ pub fn create_zpool(
|
||||
worker.log(output);
|
||||
|
||||
if std::path::Path::new("/lib/systemd/system/zfs-import@.service").exists() {
|
||||
let import_unit = format!("zfs-import@{}.service", pbs_systemd::escape_unit(&name, false));
|
||||
pbs_systemd::enable_unit(&import_unit)?;
|
||||
let import_unit = format!("zfs-import@{}.service", proxmox_systemd::escape_unit(&name, false));
|
||||
proxmox_systemd::enable_unit(&import_unit)?;
|
||||
}
|
||||
|
||||
if let Some(compression) = compression {
|
||||
|
@ -35,7 +35,7 @@ use proxmox_backup::{
|
||||
};
|
||||
|
||||
use pbs_buildcfg::configdir;
|
||||
use pbs_systemd::time::{compute_next_event, parse_calendar_event};
|
||||
use proxmox_systemd::time::{compute_next_event, parse_calendar_event};
|
||||
use pbs_tools::logrotate::LogRotate;
|
||||
|
||||
use pbs_api_types::{
|
||||
|
@ -431,7 +431,7 @@ pub fn send_tape_backup_status(
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let (fqdn, port) = get_server_url();
|
||||
let duration: pbs_systemd::time::TimeSpan = summary.duration.into();
|
||||
let duration: proxmox_systemd::time::TimeSpan = summary.duration.into();
|
||||
let mut data = json!({
|
||||
"job": job,
|
||||
"fqdn": fqdn,
|
||||
|
@ -46,7 +46,7 @@ use proxmox::tools::fs::{
|
||||
create_path, file_read_optional_string, replace_file, CreateOptions,
|
||||
};
|
||||
|
||||
use pbs_systemd::time::{compute_next_event, parse_calendar_event};
|
||||
use proxmox_systemd::time::{compute_next_event, parse_calendar_event};
|
||||
use pbs_config::{open_backup_lockfile, BackupLockGuard};
|
||||
use pbs_api_types::{UPID, JobScheduleStatus};
|
||||
|
||||
|
@ -606,7 +606,7 @@ pub struct DeviceLockGuard(std::fs::File);
|
||||
// Uses systemd escape_unit to compute a file name from `device_path`, the try
|
||||
// to lock `/var/lock/<name>`.
|
||||
fn open_device_lock(device_path: &str) -> Result<std::fs::File, Error> {
|
||||
let lock_name = pbs_systemd::escape_unit(device_path, true);
|
||||
let lock_name = proxmox_systemd::escape_unit(device_path, true);
|
||||
|
||||
let mut path = std::path::PathBuf::from(crate::tape::DRIVE_LOCK_DIR);
|
||||
path.push(lock_name);
|
||||
|
@ -39,7 +39,7 @@ use proxmox::tools::{
|
||||
},
|
||||
};
|
||||
|
||||
use pbs_systemd::time::compute_next_event;
|
||||
use proxmox_systemd::time::compute_next_event;
|
||||
use pbs_config::BackupLockGuard;
|
||||
use pbs_api_types::{MediaSetPolicy, RetentionPolicy, MediaStatus, MediaLocation};
|
||||
|
||||
|
@ -18,7 +18,7 @@ use pbs_api_types::{
|
||||
Fingerprint, MediaStatus, MediaLocation, MediaSetPolicy, RetentionPolicy,
|
||||
MediaPoolConfig,
|
||||
};
|
||||
use pbs_systemd::time::compute_next_event;
|
||||
use proxmox_systemd::time::compute_next_event;
|
||||
use pbs_config::BackupLockGuard;
|
||||
|
||||
use crate::tape::{
|
||||
|
@ -5,7 +5,7 @@
|
||||
use std::path::PathBuf;
|
||||
use anyhow::Error;
|
||||
|
||||
use pbs_systemd::time::parse_time_span;
|
||||
use proxmox_systemd::time::parse_time_span;
|
||||
use pbs_api_types::{RetentionPolicy, MediaSetPolicy};
|
||||
|
||||
use crate::tape::{Inventory, MediaPool};
|
||||
|
@ -102,8 +102,8 @@ fn test_media_expire_time() -> Result<(), Error> {
|
||||
let sl2= MediaSetLabel::with_data("p1", Uuid::generate(), 0, ctime + 120, None);
|
||||
let tape2_uuid = inventory.generate_used_tape("tape2", sl2, 0);
|
||||
|
||||
let event = pbs_systemd::time::parse_calendar_event("*:0/2")?;
|
||||
let span = pbs_systemd::time::parse_time_span("120 seconds")?;
|
||||
let event = proxmox_systemd::time::parse_calendar_event("*:0/2")?;
|
||||
let span = proxmox_systemd::time::parse_time_span("120 seconds")?;
|
||||
|
||||
let pool = MediaPool::new(
|
||||
"p1",
|
||||
|
@ -248,10 +248,10 @@ pub enum ServiceStartup {
|
||||
|
||||
pub const SYSTEMD_TIMESPAN_SCHEMA: Schema = StringSchema::new(
|
||||
"systemd time span")
|
||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_time_span))
|
||||
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_time_span))
|
||||
.schema();
|
||||
|
||||
pub const SYSTEMD_CALENDAR_EVENT_SCHEMA: Schema = StringSchema::new(
|
||||
"systemd calendar event")
|
||||
.format(&ApiStringFormat::VerifyFn(pbs_systemd::time::verify_calendar_event))
|
||||
.format(&ApiStringFormat::VerifyFn(proxmox_systemd::time::verify_calendar_event))
|
||||
.schema();
|
||||
|
Reference in New Issue
Block a user