aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md32
-rw-r--r--config.def.h2
-rw-r--r--systemd/udev-block-notify.service2
-rw-r--r--udev-block-notify.c8
-rw-r--r--udev-block-notify.h2
5 files changed, 37 insertions, 9 deletions
diff --git a/README.md b/README.md
index 57f960c..6abc71e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
udev-block-notify
=================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/udev-block-notify?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/udev-block-notify/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/udev-block-notify?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/udev-block-notify/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/udev-block-notify?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/udev-block-notify/watchers)
+
**Notify about udev block events**
This runs in background and produces notifications whenever udev (or systemd)
@@ -14,14 +18,18 @@ Or for optical media:
These are just examples, it shows information about every block device.
+*Use at your own risk*, pay attention to
+[license and warranty](#license-and-warranty), and
+[disclaimer on external links](#disclaimer-on-external-links)!
+
Requirements
------------
To compile and run `udev-block-notify` you need:
-* [systemd](https://www.github.com/systemd/systemd)
-* [libnotify](https://developer.gnome.org/notification-spec/)
-* [markdown](https://daringfireball.net/projects/markdown/) (HTML documentation)
+* [systemd ↗️](https://www.github.com/systemd/systemd)
+* [libnotify ↗️](https://developer.gnome.org/notification-spec/)
+* [markdown ↗️](https://daringfireball.net/projects/markdown/) (HTML documentation)
* `gnome-icon-theme` and `gnome-icon-theme-extras` (or anything else that includes the required media icons)
Some systems may require additional development packages for the libraries.
@@ -62,6 +70,21 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[GNU General Public License](COPYING.md) for more details.
+Disclaimer on external links
+----------------------------
+
+Our website contains links to the websites of third parties ("external
+links"). As the content of these websites is not under our control, we
+cannot assume any liability for such external content. In all cases, the
+provider of information of the linked websites is liable for the content
+and accuracy of the information provided. At the point in time when the
+links were placed, no infringements of the law were recognisable to us.
+As soon as an infringement of the law becomes known to us, we will
+immediately remove the link in question.
+
+> 💡️ **Hint**: All external links are marked with an arrow pointing
+> diagonally in an up-right (or north-east) direction (↗️).
+
### Upstream
URL:
@@ -70,3 +93,6 @@ URL:
Mirror:
[eworm.de](https://git.eworm.de/cgit.cgi/udev-block-notify/)
[GitLab.com](https://gitlab.com/eworm-de/udev-block-notify#udev-block-notify)
+
+---
+[⬆️ Go back to top](#top)
diff --git a/config.def.h b/config.def.h
index f3ade4f..9dde915 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,5 +1,5 @@
/*
- * (C) 2011-2024 by Christian Hesse <mail@eworm.de>
+ * (C) 2011-2025 by Christian Hesse <mail@eworm.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/systemd/udev-block-notify.service b/systemd/udev-block-notify.service
index 73a031d..3002051 100644
--- a/systemd/udev-block-notify.service
+++ b/systemd/udev-block-notify.service
@@ -1,4 +1,4 @@
-# (C) 2011-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2011-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/udev-block-notify.c b/udev-block-notify.c
index 207044f..5cfeac5 100644
--- a/udev-block-notify.c
+++ b/udev-block-notify.c
@@ -1,5 +1,5 @@
/*
- * (C) 2011-2024 by Christian Hesse <mail@eworm.de>
+ * (C) 2011-2025 by Christian Hesse <mail@eworm.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -162,8 +162,10 @@ int main (int argc, char ** argv) {
notifications->notification = NULL;
notifications->next = NULL;
- signal(SIGINT, received_signal);
- signal(SIGTERM, received_signal);
+ struct sigaction act = { 0 };
+ act.sa_handler = received_signal;
+ sigaction(SIGINT, &act, NULL);
+ sigaction(SIGTERM, &act, NULL);
#ifdef HAVE_SYSTEMD
sd_notify(0, "READY=1\nSTATUS=Waiting for udev block events...");
diff --git a/udev-block-notify.h b/udev-block-notify.h
index 570953b..c8ce561 100644
--- a/udev-block-notify.h
+++ b/udev-block-notify.h
@@ -1,5 +1,5 @@
/*
- * (C) 2011-2024 by Christian Hesse <mail@eworm.de>
+ * (C) 2011-2025 by Christian Hesse <mail@eworm.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by