1 |
diff -Nur smeserver-yum-2.6.0.old/root/usr/lib/yum-plugins/smeserver.py smeserver-yum-2.6.0/root/usr/lib/yum-plugins/smeserver.py |
2 |
--- smeserver-yum-2.6.0.old/root/usr/lib/yum-plugins/smeserver.py 2019-01-23 22:33:15.281000000 -0500 |
3 |
+++ smeserver-yum-2.6.0/root/usr/lib/yum-plugins/smeserver.py 2019-01-23 23:53:18.272000000 -0500 |
4 |
@@ -25,27 +25,37 @@ |
5 |
|
6 |
# list of packages that need a reboot |
7 |
# if a package name starts with one these names, a reboot is needed |
8 |
-rebootpkgs = ['kernel', 'glibc', 'linux-firmware', 'systemd', 'udev', 'openssl-libs', 'gnutls', 'dbus', 'daemontools', 'lvm2', 'mdadm'] |
9 |
+rebootpkgs = ['daemontools', 'dbus', 'glibc', 'gnutls', 'kernel', 'linux-firmware', 'lvm2', 'mdadm', 'openssl-libs', 'systemd'] |
10 |
+# exclusions : |
11 |
+rebootpkgsexclude = dict() |
12 |
+rebootpkgsexclude['dbus']='-python','-tests','-devel','-doc', |
13 |
+rebootpkgsexclude['glibc']='-devel','-headers','-statics','-utils', |
14 |
+rebootpkgsexclude['gnutls']='-devel', |
15 |
+rebootpkgsexclude['kernel']='-doc','-debug','-devel','-abi-whitelists','tools', |
16 |
+rebootpkgsexclude['lvm2']='-devel','-python', |
17 |
+rebootpkgsexclude['systemd']='-devel', |
18 |
+ |
19 |
|
20 |
# list of packages that need a service restart |
21 |
# if a package name starts with one of these values, a service restart is needed |
22 |
# since, for example, httpd means httpd-admin and httpd-e-smith, we won't use these names directly but via serviceslist (see below) |
23 |
-restartpkgs = ['httpd', 'openssh', 'openldap', 'squid', 'dovecot', 'nut', 'freeradius', 'iptables', 'mysql', 'php', 'pptpd', 'proftp', 'qmail', 'qpsmtpd', 'samba', 'spamassassin'] |
24 |
+restartpkgs = ['dovecot','freeradius','httpd','iptables', 'mysql', 'nut', 'openldap', 'openssh', 'php', 'pptpd', 'proftp', 'samba', 'spamassassin', 'squid', 'qmail', 'qpsmtpd'] |
25 |
servicenames = dict() |
26 |
-servicenames['httpd']='httpd-admin','httpd-e-smith' |
27 |
-servicenames['openssh']='sshd', |
28 |
-servicenames['openldap']='ldap', |
29 |
+servicenames['dovecot']='dovecot','pop3','pop3s', |
30 |
servicenames['freeradius']='radiusd', |
31 |
+servicenames['httpd']='httpd-admin','httpd-e-smith' |
32 |
servicenames['iptables']='masq', |
33 |
servicenames['mysql']='mysqld', |
34 |
+servicenames['nut']='nut-server','nut-driver','nut-monitor', |
35 |
+servicenames['openldap']='ldap', |
36 |
+servicenames['openssh']='sshd', |
37 |
servicenames['php']='httpd-e-smith', |
38 |
servicenames['proftp']='ftp', |
39 |
servicenames['samba']='smb', |
40 |
servicenames['spamassassin']='spamd', |
41 |
servicenames['squid']='squid', |
42 |
-servicenames['dovecot']='dovecot','pop3','pop3s' |
43 |
-servicenames['qpsmtpd']='qpsmtpd', |
44 |
servicenames['qmail']='qmail', |
45 |
+servicenames['qpsmtpd']='qpsmtpd' |
46 |
|
47 |
smechange = False |
48 |
ourfile = False |
49 |
@@ -164,8 +174,22 @@ |
50 |
for pkg in rebootpkgs: |
51 |
if n.startswith(pkg): |
52 |
#print 'Package: ' + tsmem.name + ' triggers reboot' |
53 |
- smechange = True |
54 |
- |
55 |
+ #smechange = True |
56 |
+ # we do some exclusions -devel -doc ... |
57 |
+ if rebootpkgsexclude[pkg]: |
58 |
+ #print 'lista' |
59 |
+ cont=False |
60 |
+ for name in rebootpkgsexclude[pkg]: |
61 |
+ #print name |
62 |
+ if n.startswith(pkg + name): |
63 |
+ #print pkg + name + ' => smechange' |
64 |
+ cont=True |
65 |
+ #smechange = True |
66 |
+ if cont: |
67 |
+ # this is an exception we do not need reboot : -devel, -doc ... |
68 |
+ continue |
69 |
+ # either no exception or does not fit exceptions: we need reboot |
70 |
+ smechange = True |
71 |
|
72 |
# check if we're upgrading a restartpkgs rpm |
73 |
for pkg in restartpkgs: |