49 Commits

Author SHA1 Message Date
Thomas Lamprecht
93aaa19cac d/postinst: remove outdated transitions fixups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 21:16:23 +02:00
Thomas Lamprecht
ae997e258a postinst: ensure pve-daily-upgrade timer gets started on transition
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 12:14:38 +01:00
Thomas Lamprecht
78bf2ea277 postinst: handle masked units
check if a unit is masked before starting/restarting/reloading it,
as else we get pretty ugly error messages during upgrade.

as "deb-systemd-helper --quiet was-enabled" differs from the
"systemctl is-enabled" behaviour, the former returns true for masked
units while the latter does not, we have to manually call systemctl,
circumventing the deb helper.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 12:14:22 +01:00
Fabian Grünbichler
378d47688a postinst: switch to /bin/sh
we don't use anything bash specific in our postinst, and this way linitian
should warn us about any bashisms we introduce.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Fabian Grünbichler
637935f058 postinst: start/restart units like dh_start
with an added "reload-or" for pvedaemon/pveproxy/spiceproxy, which
dh_start unfortunately does not yet support

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Fabian Grünbichler
492af7c510 postinst: unify version-dependent cleanup
putting this into one place is better for readability

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Fabian Grünbichler
81d670ebd7 postinst: refactor service/timer handling
reduce code duplication, and reload-or-restart timers just like service
units instead of just starting them.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Fabian Grünbichler
ec33c02fde postinst: actually enable and start pveupdate.timer
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Fabian Grünbichler
37595bed0c postinst: cleanup trigger code
reload-or-try-restart works just fine even if the unit is stopped or
disabled

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-13 11:06:12 +01:00
Thomas Lamprecht
1605fdfacd pveupdate: replace cron job with systemd timer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:14:13 +01:00
Thomas Lamprecht
a637b9ac8c postinst: remove pvebanner call
We have the pvebanner.service in places which ensures this gets
called on boot before the getty target.

Thus this only had an effect if we changed the nodename to IP mapping
_and_ upgraded/reinstalled pve-manager, then switching to another TTY
would show the updated IP. But as this a) is for sure not a common
triggered path and b) a IP change suggest a reboot either way, and if
the user can handle it on their own without a reboot, they should be
able to also handle an outdated /etc/issue until the next reboot.

Also for PVE ontop of plain Debian a reboot is needed, so that the
PVE kernel gets booted, so this shouldn't be an issue ther neither.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
b0138a12bc postinst: remove commented out call to a2ensite
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
482aa8094e postinst: remove fixup for ceph jewel update transition
In commit 8b89f7533e2df983e0285e2f170971a3637d7349 we needed to
change the ceph.service install target to multi-user.target, as
ceph.target could hang indefinitely if ceph-common gets upgraded.
This change is included in pve-manager 4.4-13 and newer, as users
wanting to upgrade to 5.0 must upgrade to latest 4.4 to be able to do
so (without headache) this can be removed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
46eba56edb postinst: simplify code for transitional updates
The first case won't happen anymore on a recent PVE.
The 'version is empty or <unknown>' check may drop the '<unknown>'
part, it gets handled by the 'dpkg --compare-versions' bits just
fine, if it happens at all for the 'configure' case

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
25ba75f77d postinst: combine abort-* cases and remove boilerplate cruft
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
eda656f50d postinst: simplify root's mail .forward check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
63b66fd921 postinst: bootlogd is not used under systemd
"Note that not all init systems print messages to the system console,
so that the logfile may remain empty; this is the case with systemd
(the default init system). Try "journalctl -b" instead."
-- https://packages.debian.org/stretch/bootlogd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
7aca385740 postinst: removing old APL dir is obsolete
This was added by 82f9a5d7c on 2012-02-21 11:42:32, as we had 2 major
upgrades since them every system either was update or new installed,
so just remove this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
13f8d48604 buildsys: remove unused debconf template
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:48 +01:00
Thomas Lamprecht
0ae4418f95 postinst: purge all old init.d service files on upgrade
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-12 15:13:44 +01:00
Thomas Lamprecht
8e144795cc rename pve-manager.service to pve-guests
the name 'pve-manager' collides with our pve-manager package name,
which - from the user point of view - provides mainly the API and
WebUI.
An user could thus think that restarting 'pve-manager' would restart
the WebUIs server, which is relatable.
But, the pve-manager.service does not controls the WebUI or its
server but is responsible for starting all guest with 'onboot=1' in
their config on system boot and to stop all remaining running guests
on system shutdown.

Thus rename it to pve-guests and adapt its description. This may not
seem as ideal name at first glance, but its better than the current
option. Further it leads to log messages like:
 > Starting PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
 > [...]
 > Started PVE guests (Service providing start-on-boot and stop-all-on-shutdown)
 > [...]
 > Stopping PVE guests (Service providing start-on-boot and stop-all-on-shutdown)

which makes it clearer what happens, or what this service is for.

Alias the new service to the old pve-manager.service for legacy
reasons. While our services do not depend on it an user could have
made an own service which used pve-manager.service as synchronisation
point.

Linitian then complains about init.d/pve-manager not having a related
systemd service file. Instead of renmaning it just drop it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-11 09:34:02 +02:00
Wolfgang Bumiller
088597a355 Revert "trust StartCom_Certification_Authority_2.crt"
This reverts commit 7637ce6464bc28c3651b5884c3fbf2fac6ed5b66.

Revert "add missing file"

This reverts commit 7599e35af893ad9d8b544a05d5289da4093749e4.

We've switched to Let's Encrypt.

postinst configure: run update-ca-certificates if the
  previous version is <= 5.0-23.
2017-07-19 09:38:49 +02:00
Dietmar Maurer
7637ce6464 trust StartCom_Certification_Authority_2.crt 2017-07-04 11:48:52 +02:00
Wolfgang Link
c74a828da0 add systemd timer unit to trigger pvesr run 2017-06-23 10:20:34 +02:00
Fabian Grünbichler
8b89f7533e fix ceph.service for Ceph Jewel >= 10.2.6
having our ceph.service pulled in by ceph.target does not
work anymore, because "systemctl start ceph.target" hangs
forever on ceph-common upgrades. multi-user.target seems to
work as well, and we are ordered after pve-cluster anyway.

only replace the old ceph.service if it is an exact match.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-03-13 14:20:14 +01:00
Dietmar Maurer
fdf6f3756c remove old/usused init.d files in postinst 2015-10-24 10:35:20 +02:00
Dietmar Maurer
b38af32f2e remove unnecessary hint about cronjob 2015-09-06 10:33:54 +02:00
Dietmar Maurer
066b7b8fad run pveupdate in the night between 2:00 and 6:00 2015-09-06 10:32:09 +02:00
Dietmar Maurer
a68bc52cfa /etc/cron.d/pveupdate: always write file in postinstall
so that we can change times in future
2015-09-06 10:30:57 +02:00
Wolfgang Link
d6b5285075 improve pveupdate with random start time
this is important to avoid that all PVE nodes start the update procedure at the same time
2015-09-06 10:07:48 +02:00
Dietmar Maurer
a69232829d avoid trigger errors if daemons are stopped 2015-06-01 13:03:08 +02:00
Dietmar Maurer
155324da10 use systemd command reload-or-restart instead of reload
So that stopped services gets restarted.
2015-03-03 07:02:02 +01:00
Dietmar Maurer
3c9f7ac986 avoid shell scripts in service definitions 2015-03-02 18:29:18 +01:00
Dietmar Maurer
ff9e8b7cb7 depend on systemd, add service files 2015-02-28 12:42:20 +01:00
Dietmar Maurer
9c1493d44a add spiceproxy server 2013-06-26 13:21:14 +02:00
Dietmar Maurer
c497a43729 use shorter login message
And avoid to use debian version, because that changes over time and
it is clumsy to keep in sync.
2013-06-17 11:22:33 +02:00
Dietmar Maurer
eccbe1c5d8 remove apache2 dependency
And add init.d script for pveproxy.
2013-04-09 12:31:14 +02:00
Dietmar Maurer
884ac1abd8 setup /etc/lsb-base-logging.sh in postinst 2013-03-26 07:16:26 +01:00
Dietmar Maurer
ab71c272cf add startall/stopall API and init script 2012-04-20 09:35:08 +02:00
Dietmar Maurer
493e43e145 download aplinfo inh postinst script 2012-02-21 12:15:10 +01:00
Dietmar Maurer
82f9a5d7cf implement template download
Also added turnkeylinux.com
2012-02-21 11:45:30 +01:00
Dietmar Maurer
1b3f8012ed use correct syntax for update-rc.d
Some versions complain about the missing dot.
2012-02-16 09:36:47 +01:00
Dietmar Maurer
291b78601f fix postinst script and Backup GUI 2012-02-10 11:21:07 +01:00
Dietmar Maurer
caac8e0696 use bash in postint script to avoid lintian warning 2012-01-24 12:12:34 +01:00
Dietmar Maurer
29880382cb add new pvemailforward helper
And automatically install a .forward file.
2012-01-18 09:45:54 +01:00
Dietmar Maurer
7aca315659 do not create /etc/cron.d/vzdump in postinst 2011-10-24 07:46:45 +02:00
Dietmar Maurer
e0dcea939a avoid error in triggers
test if /etc/pve is mounted; else simple exit
2011-10-04 07:04:30 +02:00
Dietmar Maurer
6a56c350de Fix startup order
Also depend on redhat-cluster-pve
2011-08-30 15:17:23 +02:00
Dietmar Maurer
5910d3b7bd imported from svn 'pve-manager/pve2' 2011-08-23 07:40:22 +02:00