[Dev] networkmanager-dispatcher-ntpd patch for openrc

José Alberto libre at josealberto4444.com
Sun Mar 24 22:36:29 GMT 2019


Currently, the networkmanager-dispatcher-ntpd script does not work for 
openrc installations. You can find the source in [1].

[1] https://git.archlinux.org/svntogit/community.git/tree/trunk/10-ntpd?
h=packages/networkmanager-dispatcher-ntpd

This, however, can be easily fixed to work without problems changing it to 
this:

#!/bin/bash


if [ -e /sys/fs/cgroup/systemd ]; then
        case "$2" in
                up)
                              systemctl start ntpd.service
                ;;
                down)
                              systemctl stop ntpd.service
                ;;
        esac
elif [ -e "/run/openrc/softlevel" ]; then
        case "$2" in
                up)
                        rc-service ntpd start
                ;;
                down)
                        rc-service ntpd stop
                ;;
        esac
elif [ -e "/etc/rc.d/ntpd" ]; then
        case "$2" in
                up)
                        rc.d start ntpd
                ;;
                down)
                        rc.d stop ntpd
                ;;
        esac
fi

I don't know how should I report this or submit this patch upstream, because 
the URL marked in the package is [2], and I cannot find this file in the git 
repo [3].

[2] http://www.gnome.org/projects/NetworkManager
[3] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/

What should I do?

--

José Alberto





More information about the Dev mailing list