<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi all,<br>
</p>
<p>The script set_dns.sh was modified <br>
</p>
<p><font color="#729fcf"><br>
@@ -1,6 +1,6 @@<br>
#!/bin/bash<br>
# Copyright (c) 1999-2017, Parallels International GmbH<br>
-# Copyright (c) 2017-2019 Virtuozzo International GmbH. All
rights reserved.<br>
+# Copyright (c) 2017-2023 Virtuozzo International GmbH. All
rights reserved.<br>
#<br>
# This file is part of OpenVZ libraries. OpenVZ is free
software; you can<br>
# redistribute it and/or modify it under the terms of the GNU
Lesser General<br>
@@ -44,6 +44,11 @@<br>
if [ -e "$RESOLVCONF" ]; then<br>
cfgfile=$RESOLVCONF<br>
[ "${VE_STATE}" = "running" ] &&
post_configure_cmd='resolvconf -u'<br>
+ if [ "${VE_STATE}" = "starting" ] && <br>
+ [ -e
/etc/systemd/system/systemd-resolved.service ] &&<br>
+ [ $(readlink
/etc/systemd/system/systemd-resolved.service) == '/dev/null' ];
then<br>
+ grep -qF -- "resolvconf -u" "/etc/rc.local" ||
echo "resolvconf -u" >> "/etc/rc.local"<br>
+ fi<br>
fi<br>
fi<br>
<br>
@@ -59,7 +64,7 @@<br>
put_param2 "${cfgfile}" search "${search}"<br>
fi<br>
fi<br>
- if [ -n "${server}" ]; then<br>
+ if [ -n "${server}" -a ! -L "${cfgfile}" ]; then<br>
[ -f "${cfgfile}" ] || touch "${cfgfile}"<br>
${CP} ${cfgfile} ${cfgfile}.$$ || error "Can't copy
file $cfgfile" $VZ_FS_NO_DISK_SPACE<br>
sed "/nameserver.*/d" ${cfgfile} > ${cfgfile}.$$<br>
@@ -129,12 +134,14 @@<br>
[ -n "$NAMESERVER" -o -n "$SEARCHDOMAIN" ] &&
netconfig -v update -m dns-resolver<br>
}<br>
<br>
-if [ -e
/etc/systemd/system/dbus-org.freedesktop.resolve1.service ];
then<br>
- set_resolved "${NAMESERVER}" "${SEARCHDOMAIN}"<br>
+if [ -e
/etc/systemd/system/dbus-org.freedesktop.resolve1.service ]
&&<br>
+ [ -e /etc/systemd/system/systemd-resolved.service ]
&&<br>
+ [ $(readlink /etc/systemd/system/systemd-resolved.service)
!= '/dev/null' ]; then<br>
+ set_resolved "${NAMESERVER}" "${SEARCHDOMAIN}"<br>
elif [ -e /sbin/netconfig -a -e /etc/sysconfig/network/config
]; then<br>
- set_network_config<br>
+ set_network_config<br>
else<br>
- set_resolvconf "${NAMESERVER}" "${SEARCHDOMAIN}"<br>
+ set_resolvconf "${NAMESERVER}" "${SEARCHDOMAIN}"<br>
fi<br>
<br>
exit 0</font></p>
<p><br>
</p>
<p># uname -a<br>
Linux - 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK
2022 x86_64 x86_64 x86_64 GNU/Linux</p>
<p># rpm -qf /usr/libexec/libvzctl/dists/scripts/set_dns.sh<br>
libvzctl-7.0.730-1.vz7.x86_64</p>
<p>cd /usr/src/</p>
<p>wget
<a
href="https://download.openvz.org/virtuozzo/updates/7.0/source/SRPMS/l/libvzctl-7.0.730-1.vz7.src.rpm"
class="moz-txt-link-freetext">https://download.openvz.org/virtuozzo/updates/7.0/source/SRPMS/l/libvzctl-7.0.730-1.vz7.src.rpm</a></p>
<p>rpm -ivh libvzctl-7.0.730-1.vz7.src.rpm</p>
<p>cat /root/rpmbuild/SPECS/libvzctl.spec</p>
<p></p>
<p><br>
</p>
<p>...<br>
</p>
<p>%changelog<br>
* Wed Mar 08 2023 Aleksandr Leskin <a
href="mailto:aleksandr.leskin@virtuozzo.com"><aleksandr.leskin@virtuozzo.com></a>
7.0.730<br>
- scripts: do not update resolv.conf file if it is symlink
#PSBM-146148</p>
<p>* Tue Mar 07 2023 Aleksandr Leskin <a
href="mailto:aleksandr.leskin@virtuozzo.com"><aleksandr.leskin@virtuozzo.com></a>
7.0.729<br>
- scripts: restore previous functionality for resolvconf
#PSBM-145766<br>
</p>
<p>...</p>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p>I rollbacked to the first I had, and it is ok now...</p>
<p>Please, could you check ?</p>
<p>Why did you need to change the script ? <br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Aurélien GUERSON
</pre>
</body>
</html>