1
|
#!/bin/bash -x
|
2
|
|
3
|
mkdir -p /root/sav/
|
4
|
|
5
|
sauveConf()
|
6
|
{
|
7
|
if [ ! -f /root/sav/$1 ]
|
8
|
then cp /etc/init.d/$1 /root/sav/
|
9
|
(dpkg -L $1 |sort) >/root/sav/$1.dpkg_avant
|
10
|
systemctl status $1.service >/root/sav/$1.status
|
11
|
cat /run/systemd/generator.late/$1.service >/root/sav/$1.run_systemd
|
12
|
cat /lib/systemd/syystem/$1.service >/root/sav/$1.service
|
13
|
fi
|
14
|
}
|
15
|
|
16
|
restoreConf()
|
17
|
{
|
18
|
if [ -f /root/sav/$1 ]
|
19
|
then
|
20
|
cp /root/sav/$1 /etc/init.d/$1
|
21
|
rm -f /lib/systemd/system/$1.service
|
22
|
fi
|
23
|
}
|
24
|
|
25
|
systemctl daemon-reload
|
26
|
sauveConf nmbd
|
27
|
sauveConf smbd
|
28
|
sauveConf samba
|
29
|
sauveConf samba-ad-dc
|
30
|
[ ! -f /root/sav/dpkg.initial ] && (dpkg -l |sort) >/root/sav/dpkg.initial
|
31
|
sed -i -e 's/ xenial/ yakkety/g' /etc/apt/sources.list
|
32
|
apt-get update
|
33
|
RUNLEVEL=1 apt-get install -y --only-upgrade samba libtdb1 libtalloc2 libpam-winbind ctdb libparse-pidl-perl heimdal-clients cifs-utils
|
34
|
cp /mnt/eole-ci-tests/scripts/dev/samba445/smb-ad.conf /usr/share/eole/creole/distrib/smb-ad.conf
|
35
|
|
36
|
# nouveau fichier
|
37
|
rm -f /lib/systemd/system/nmbd.service
|
38
|
rm -f /lib/systemd/system/samba-ad-dc.service
|
39
|
rm -f /lib/systemd/system/smbd.service
|
40
|
|
41
|
# fichier supprimé
|
42
|
rm -f /usr/bin/smbta-util
|
43
|
rm -f /usr/share/man/man8/smbta-util.8.gz
|
44
|
rm -f /usr/lib/x86_64-linux-gnu/samba/service/smb.so
|
45
|
|
46
|
(dpkg -L samba |sort) >/root/sav/samba.dpkg_apres
|
47
|
diff /root/sav/samba.dpkg_apres /root/sav/samba.dpkg_avant
|
48
|
|
49
|
(dpkg -l |sort) >/root/sav/dpkg.apres
|
50
|
diff /root/sav/dpkg.apres /root/sav/dpkg.initial
|
51
|
|
52
|
grep "4.3.9+dsfg" /root/sav/dpkg.apres
|
53
|
|
54
|
rm -f /lib/systemd/system/samba.service
|
55
|
systemctl daemon-reload
|
56
|
/lib/systemd/system-generators/systemd-sysv-generator
|
57
|
systemctl unmask samba-ad-dc.service
|
58
|
systemctl daemon-reload
|
59
|
|
60
|
systemctl status samba-ad-dc.service
|
61
|
systemctl status samba.service
|
62
|
systemctl status smbd.service
|
63
|
systemctl status nmbd.service
|
64
|
|
65
|
#python-ldb
|
66
|
#samba-dsdb-modules
|
67
|
#winbind
|
68
|
#samba
|
69
|
#samba-common-bin
|
70
|
#libsmbclient
|
71
|
#python-samba
|
72
|
#samba-vfs-modules
|
73
|
#samba-libs (:amd64)
|
74
|
#libldb1
|
75
|
#python-talloc
|
76
|
#samba-common
|