mirror of
git://slackware.nl/current.git
synced 2025-02-14 08:48:37 +01:00
![Patrick J Volkerding](/assets/img/avatar_default.png)
a/libcgroup-3.1.0-x86_64-1.txz: Upgraded. Thanks to 0XBF for the many upgrade hints. a/shadow-4.17.2-x86_64-1.txz: Upgraded. I'm not seeing new issues for this on github, so it's probably safe to upgrade again now that it has aged for a while. a/sysvinit-scripts-15.1-noarch-25.txz: Rebuilt. rc.S: support mounting cgroups v2 (but still default to v1). Please note that unless you have a specific need for cgroups v2, it is better to stick with v1. In particular, rc.cgred is no longer supported with v2. Thanks to 0XBF. d/python-pip-25.0-x86_64-1.txz: Upgraded. n/getmail-6.19.07-x86_64-1.txz: Upgraded.
35 lines
911 B
Bash
35 lines
911 B
Bash
#!/bin/sh
|
|
config() {
|
|
NEW="$1"
|
|
OLD="`dirname $NEW`/`basename $NEW .new`"
|
|
# If there's no config file by that name, mv it over:
|
|
if [ ! -r $OLD ]; then
|
|
mv $NEW $OLD
|
|
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
|
|
rm $NEW
|
|
fi
|
|
# Otherwise, we leave the .new copy for the admin to consider...
|
|
}
|
|
|
|
preserve_perms() {
|
|
NEW="$1"
|
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
|
if [ -e $OLD ]; then
|
|
cp -a $OLD ${NEW}.incoming
|
|
cat $NEW > ${NEW}.incoming
|
|
mv ${NEW}.incoming $NEW
|
|
fi
|
|
config $NEW
|
|
}
|
|
|
|
# preserve_perms() the rc scripts:
|
|
preserve_perms etc/rc.d/rc.cgconfig.new
|
|
preserve_perms etc/rc.d/rc.cgred.new
|
|
|
|
# config() the other configuration files:
|
|
config etc/cgconfig.conf.new
|
|
config etc/cgred.conf.new
|
|
config etc/cgrules.conf.new
|
|
config etc/cgsnapshot_allowlist.conf.new
|
|
config etc/cgsnapshot_denylist.conf.new
|
|
config etc/default/cgroups.new
|