diff options
author | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:47:00 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:47:00 (GMT) |
commit | d8b184861c06ae009bb0351ab0d5dba1a36b8e42 (patch) | |
tree | 8f708e0bdd8d6ace1244df033794cd379f44f8ad /abs/core/ntp/install | |
parent | e8a245cc01440494094fa910176eb9ae13446a23 (diff) | |
download | linhes_pkgbuild-d8b184861c06ae009bb0351ab0d5dba1a36b8e42.zip linhes_pkgbuild-d8b184861c06ae009bb0351ab0d5dba1a36b8e42.tar.gz linhes_pkgbuild-d8b184861c06ae009bb0351ab0d5dba1a36b8e42.tar.bz2 |
ntp: ntp 4.2.6
Diffstat (limited to 'abs/core/ntp/install')
-rw-r--r-- | abs/core/ntp/install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/core/ntp/install b/abs/core/ntp/install new file mode 100644 index 0000000..e6eddf8 --- /dev/null +++ b/abs/core/ntp/install @@ -0,0 +1,37 @@ +post_install() { + getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null + getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null + true +} + +post_upgrade() { + if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then + cat <<EOF + +==> The file /etc/conf.d/ntp-client.conf has been renamed /etc/conf.d/ntpd.conf +==> If you made changes to the former, please update the latter. + +EOF + fi + if [[ $(vercmp $2 4.2.6.p5-1) -le 0 ]]; then + cat <<EOF + +==> The PID file /var/run/ntpd.pid has been renamed /run/ntpd.pid +==> and the new rc.d script only takes the latter into account. +==> To stop your old ntpd process, please kill it manually. + +EOF + fi + if [[ $(vercmp $2 4.2.6.p5-3) -le 0 ]]; then + post_install + fi + if [[ $(vercmp $2 4.2.6.p5-5) -le 0 ]]; then + chown -R ntp /var/lib/ntp + fi +} + +post_remove() { + getent passwd ntp &>/dev/null && userdel ntp >/dev/null + getent group ntp &>/dev/null && groupdel ntp >/dev/null + true +} |