grub-btrfsd: add verbose and syslog options

Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
This commit is contained in:
Pascal Jäger
2022-09-01 23:26:25 +02:00
parent 8c8ee200fd
commit 9064d61145
5 changed files with 109 additions and 32 deletions

View File

@@ -9,7 +9,7 @@ when a new btrfs snapshot is created.
.SH "SYNOPSIS"
.PP
\fCgrub\-btrfsd [\-h, \-\-help] [\-t, \-\-timeshift\-auto] [\-l, \-\-log\-file LOG_FILE] SNAPSHOTS_DIR\fP
\fCgrub\-btrfsd [\-h, \-\-help] [\-t, \-\-timeshift\-auto] [\-l, \-\-log\-file LOG_FILE] [\-v, \-\-verbose] [\-s, \-\-syslog] SNAPSHOTS_DIR\fP
.SH "DESCRIPTION"
.PP
@@ -26,7 +26,7 @@ E.g. for Snapper this would be \fC/.snapshots\fP
.PP
This is a flag to activate the auto detection of the path where Timeshift stores snapshots. Newer versions (>=22.06) of Timeshift mount their snapshots to \fC/run/timeshift/$PID/backup/timeshift\-btrfs\fP. Where \fC$PID\fP is the process ID of the currently running Timeshift session. The PID is changing every time Timeshift is opened. grub-btrfsd can automatically take care of the detection of the correct PID and directory if this flag is set. In this case the argument \fCSNAPSHOTS_DIR\fP has no effect.
.SS "\fC\-l /\-\-log\-file\fP"
.SS "\fC\-l / \-\-log\-file\fP"
.PP
This arguments specifies a file where grub-btrfsd should write log messages.
@@ -34,6 +34,14 @@ This arguments specifies a file where grub-btrfsd should write log messages.
.PP
Displays a short help message.
.SS "\fC\-v / \-\-verbose\fP"
.PP
Let the log of the daemon be more verbose
.SS "\fC\-s / \-\-syslog\fP"
.PP
Write to syslog
.SH "CONFIGURATION"
.PP
The daemon is usually configured via the file \fC/etc/conf.d/grub\-btrfsd\fP on openrc-init systems and \fCsudo systemctl edit \-\-full grub\-btrfsd\fP on systemd systems. In this file the arguments (See OPTIONS), that OpenRC passes to the daemon when it is started, can be configured.

View File

@@ -10,7 +10,7 @@ grub-btrfsd - An OpenRC daemon to automatically update the grub menu with
when a new btrfs snapshot is created.
* SYNOPSIS
~grub-btrfsd [-h, --help] [-t, --timeshift-auto] [-l, --log-file LOG_FILE] SNAPSHOTS_DIR~
~grub-btrfsd [-h, --help] [-t, --timeshift-auto] [-l, --log-file LOG_FILE] [-v, --verbose] [-s, --syslog] SNAPSHOTS_DIR~
* DESCRIPTION
Grub-btrfs-openrc is a shell script which is meant to be run as a daemon.
@@ -24,12 +24,18 @@ E.g. for Snapper this would be ~/.snapshots~
** ~-t / --timeshift-auto~
This is a flag to activate the auto detection of the path where Timeshift stores snapshots. Newer versions (>=22.06) of Timeshift mount their snapshots to ~/run/timeshift/$PID/backup/timeshift-btrfs~. Where ~$PID~ is the process ID of the currently running Timeshift session. The PID is changing every time Timeshift is opened. grub-btrfsd can automatically take care of the detection of the correct PID and directory if this flag is set. In this case the argument ~SNAPSHOTS_DIR~ has no effect.
** ~-l /--log-file~
** ~-l / --log-file~
This arguments specifies a file where grub-btrfsd should write log messages.
** ~-h / --help~
Displays a short help message.
** ~-v / --verbose~
Let the log of the daemon be more verbose
** ~-s / --syslog~
Write to syslog
* CONFIGURATION
The daemon is usually configured via the file ~/etc/conf.d/grub-btrfsd~ on openrc-init systems and ~sudo systemctl edit --full grub-btrfsd~ on systemd systems. In this file the arguments (See OPTIONS), that OpenRC passes to the daemon when it is started, can be configured.