saving uncommitted changes in /etc prior to apt run

This commit is contained in:
2022-07-08 10:13:06 +02:00
committed by Gitea
parent 8d8430c712
commit a3244c15fc
9 changed files with 1 additions and 106 deletions
+1 -7
View File
@@ -9,6 +9,7 @@ mkdir -p './apt/auth.conf.d'
mkdir -p './apt/listchanges.conf.d'
mkdir -p './binfmt.d'
mkdir -p './ca-certificates/update.d'
mkdir -p './calendar'
mkdir -p './clamav/onerrorexecute.d'
mkdir -p './clamav/onupdateexecute.d'
mkdir -p './clamav/virusevent.d'
@@ -325,7 +326,6 @@ maybe chmod 0755 'ca-certificates'
maybe chmod 0644 'ca-certificates.conf'
maybe chmod 0755 'ca-certificates/update.d'
maybe chmod 0755 'calendar'
maybe chmod 0644 'calendar/default'
maybe chmod 0775 'check_mk'
maybe chmod 0640 'check_mk/logwatch.cfg'
maybe chmod 0640 'check_mk/mk_inventory.cfg'
@@ -490,7 +490,6 @@ maybe chmod 0755 'dhcp/dhclient-exit-hooks.d/hook-dhclient'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntp'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntpdate'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/timesyncd'
maybe chmod 0644 'dhcp/dhclient.conf'
maybe chmod 0755 'dictionaries-common'
maybe chmod 0644 'discover-modprobe.conf'
@@ -3930,13 +3929,9 @@ maybe chmod 0644 'profile.d/bash_completion.sh'
maybe chmod 0644 'profile.d/gawk.csh'
maybe chmod 0644 'profile.d/gawk.sh'
maybe chmod 0644 'protocols'
maybe chmod 0755 'python'
maybe chmod 0644 'python/debian_config'
maybe chmod 0755 'python2.7'
maybe chmod 0644 'python2.7/sitecustomize.py'
maybe chmod 0755 'python3'
maybe chmod 0755 'python3.7'
maybe chmod 0644 'python3.7/sitecustomize.py'
maybe chmod 0755 'python3.9'
maybe chmod 0644 'python3.9/sitecustomize.py'
maybe chmod 0644 'python3/debian_config'
@@ -4243,7 +4238,6 @@ maybe chmod 0755 'systemd/system/sockets.target.wants'
maybe chmod 0755 'systemd/system/sysinit.target.wants'
maybe chmod 0755 'systemd/system/timers.target.wants'
maybe chmod 0755 'systemd/system/unbound.service.wants'
maybe chmod 0644 'systemd/timesyncd.conf'
maybe chmod 0755 'systemd/user'
maybe chmod 0644 'systemd/user.conf'
maybe chmod 0755 'systemd/user/sockets.target.wants'
-15
View File
@@ -1,15 +0,0 @@
/* This is the system-wide default calendar file, used if calendar(1)
* is invoked by a user without a ~/calendar or ~/.calendar/calendar file.
* It may be edited or even deleted to reflect local policy.
*
* In the standard setup, we simply include the default calendar
* definitions from /usr/share/calendar/calendar.all. If you want
* only some of those definitions, copy calendar.all to /etc/calendar
* and edit it there. That way, your changes will be kept next time
* you upgrade.
*
* The search path for include files is:
* /etc/calendar
* /usr/share/calendar
*/
#include "calendar.all"
-52
View File
@@ -1,52 +0,0 @@
TIMESYNCD_CONF=/run/systemd/timesyncd.conf.d/01-dhclient.conf
timesyncd_servers_setup_remove() {
if [ ! -d /run/systemd/system ]; then
return
fi
if [ ! -x /lib/systemd/systemd-timesyncd ]; then
return
fi
if [ -e $TIMESYNCD_CONF ]; then
rm -f $TIMESYNCD_CONF
systemctl try-restart systemd-timesyncd.service || true
fi
}
timesyncd_servers_setup_add() {
if [ ! -d /run/systemd/system ]; then
return
fi
if [ ! -x /lib/systemd/systemd-timesyncd ]; then
return
fi
if [ -e $TIMESYNCD_CONF ] && [ "$new_ntp_servers" = "$old_ntp_servers" ]; then
return
fi
if [ -z "$new_ntp_servers" ]; then
timesyncd_servers_setup_remove
return
fi
mkdir -p $(dirname $TIMESYNCD_CONF)
cat <<EOF > ${TIMESYNCD_CONF}.new
# NTP server entries received from DHCP server
[Time]
NTP=$new_ntp_servers
EOF
mv ${TIMESYNCD_CONF}.new ${TIMESYNCD_CONF}
systemctl try-restart systemd-timesyncd.service || true
}
case $reason in
BOUND|RENEW|REBIND|REBOOT)
timesyncd_servers_setup_add
;;
EXPIRE|FAIL|RELEASE|STOP)
timesyncd_servers_setup_remove
;;
esac
-3
View File
@@ -1,3 +0,0 @@
[DEFAULT]
# how to byte-compile (comma separated: standard, optimize)
byte-compile = standard
-7
View File
@@ -1,7 +0,0 @@
# install the apport exception handler if available
try:
import apport_python_hook
except ImportError:
pass
else:
apport_python_hook.install()
@@ -1 +0,0 @@
/lib/systemd/system/systemd-timesyncd.service
@@ -1 +0,0 @@
/lib/systemd/system/systemd-timesyncd.service
-1
View File
@@ -1 +0,0 @@
/dev/null
-19
View File
@@ -1,19 +0,0 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.
[Time]
#NTP=
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048