Skip to content

Commit

Permalink
v1.1 release
Browse files Browse the repository at this point in the history
This commit fixes an issue with the upstream `ocamlfuse` package and improves
the `nsa` command line interface by using differentiated return codes.
  • Loading branch information
bensmrs committed Mar 17, 2024
1 parent 28e08a1 commit 6877da7
Show file tree
Hide file tree
Showing 32 changed files with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
resel-nsa (1.1-1) UNRELEASED; urgency=low

* Fix issue with upstream `ocamlfuse`
* Improve `nsa` command with differentiated return codes

-- Benjamin Somers <[email protected]> Sun, 17 Mar 2024 14:13:21 +0100

resel-nsa (1.0-1) UNRELEASED; urgency=low

* Complete revamping in OCaml with systemd support
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH nsa 8 "23 février 2024" "ResEl NSA" "ResEl NSA user manual"
.TH nsa 8 "17 mars 2024" "ResEl NSA" "ResEl NSA user manual"
.SH NOM
nsa \- Interface de contrôle de ResEl NSA
.SH SYNOPSIS
Expand All @@ -13,7 +13,13 @@ Affiche les journaux systemd du service \fBnsafs\fR.
.B nsa schedule
<module> <calendrier>

Ordonnance un module qui n’est pas déjà ordonnancé.
Ordonnance un module qui n’est pas déjà ordonnancé. Retourne le code
.B 1
si le module n’existe pas, le code
.B 3
si le module est déjà ordonnancé, et le code
.B 4
si le calendrier est invalide.

.RS 2m
.TP 13m
Expand All @@ -22,7 +28,7 @@ Nom du module, correspondant à un exécutable dans
\fI/usr/libexec/nsa/modules\fR.
.TP
.I <calendrier>
Chaîne de caractère décrivant un calendrier systemd, ou raccourci parmi
Chaîne de caractères décrivant un calendrier systemd, ou raccourci parmi
\fBevery-second\fR, \fBevery-minute\fR, \fBhourly\fR, \fBdaily\fR, \fBweekly\fR,
.B monthly
ou \fByearly\fR.
Expand All @@ -31,7 +37,9 @@ ou \fByearly\fR.
.B nsa unschedule
<module>

Supprime l’ordonnancement d’un module
Supprime l’ordonnancement d’un module. Retourne le code
.B 3
si le module n’est pas déjà ordonnancé.

.B nsa watch

Expand All @@ -42,6 +50,12 @@ planifiées.
.B nsa inspect

Affiche la spoule de \fBNSAfs\fR.
.RE

Le code
.B 2
est retourné lorsque des paramètres inadéquats sont fournis à \fBnsa\fR.

.SH VOIR AUSSI
.BR nsa.conf (5),
.BR nsafs (5),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions resel-nsa-1.0/usr/bin/nsa → resel-nsa-1.1/usr/bin/nsa
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function already-scheduled {
function die-with-man {
man 8 nsa
echo "Incorrect parameters given."
exit 1
exit 2
}

function nsa-systemctl {
Expand All @@ -25,7 +25,7 @@ function nsa-schedule {
if already-scheduled "$service"
then
echo "$1 is already scheduled. Please remove it first with \`nsa-schedule remove $1\`."
exit 1
exit 3
fi
if [ ! -f "/usr/libexec/nsa/modules/$1" ]
then
Expand All @@ -39,7 +39,7 @@ function nsa-schedule {
if ! systemd-analyze calendar "$2" > /dev/null 2>&1
then
echo "\"$2\" is not a valid calendar specification."
exit 1
exit 4
fi
cat > "/etc/systemd/system/nsa-$service.timer" <<EOF
[Unit]
Expand Down Expand Up @@ -69,7 +69,7 @@ function nsa-unschedule {
if ! already-scheduled "$service"
then
echo "$1 is not scheduled."
exit 1
exit 3
fi
timer="$(systemctl list-timers --all --quiet --no-pager "nsa*$service.timer" | awk '{print $(NF-1)}')"
systemctl disable "$timer"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6877da7

Please sign in to comment.