Skip to content

Instantly share code, notes, and snippets.

@DuratarskeyK
Created February 15, 2017 19:02
Show Gist options
  • Save DuratarskeyK/aea838ce54ec4027d61181c9231f5366 to your computer and use it in GitHub Desktop.
Save DuratarskeyK/aea838ce54ec4027d61181c9231f5366 to your computer and use it in GitHub Desktop.
triggerun scriptlet (using /bin/sh) -- vixie-cron
cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||:
# if the lock exist, then we restart daemon (it was running in the past).
# add new daemon into chkconfig everytime, when we upgrade to cronie from vixie-cron
triggerpostun scriptlet (using /bin/sh) -- vixie-cron
/sbin/chkconfig --add crond
[ -f /var/lock/subsys/cronie ] && ( rm -f /var/lock/subsys/cronie ; service crond restart ) > /dev/null 2>&1 ||:
triggerin scriptlet (using /bin/sh) -- pam, glibc
/bin/systemctl try-restart crond.service >/dev/null 2>&1 || :
triggerpostun scriptlet (using /bin/sh) -- openldap-clients < 2.1.25-5mdk
# We may have openldap client configuration in /etc/ldap.conf
# which now needs to be in /etc/openldap/ldap.conf
if [ -f /etc/ldap.conf ]
then
mv -f /etc/openldap/ldap.conf /etc/openldap/ldap.conf.rpmfix
cp -af /etc/ldap.conf /etc/openldap/ldap.conf
fi
triggerun scriptlet (using /bin/sh) -- dbus < 1.4.16-1
/bin/systemctl enable dbus.service >/dev/null 2>&1
/sbin/chkconfig --del messagebus >/dev/null 2>&1 || :
/bin/systemctl try-restart dbus.service >/dev/null 2>&1 || :
triggerpostun scriptlet (using /bin/sh) -- dbus < 1.2.4.4permissive-2mdv
/sbin/chkconfig --level 7 messagebus reset
triggerun scriptlet (using /bin/sh) -- kbd < 1.15-5mdv
/sbin/chkconfig --del keytable
exit 0
triggerpostun scriptlet (using /bin/sh) -- vim-minimal < 7.3
update-alternatives --remove uvi /bin/vim-minimal
for i in view ex rvi rview rvim; do
update-alternatives --remove $i /bin/$i || :
done
triggerpostun scriptlet (using /bin/sh) -- acpi < 0.09-4
rm -f /etc/rc.d/*/{K,S}*acpi
triggerin scriptlet (using /bin/sh) -- glibc
# reexec daemon on self or glibc update to avoid busy / on shutdown
# trigger is executed on both self and target install so no need to have
# extra own post
if [ $1 -ge 2 -o $2 -ge 2 ] ; then
/bin/systemctl daemon-reexec 2>&1 || :
fi
triggerun scriptlet (using /bin/sh) -- systemd < 196
/usr/bin/systemctl restart systemd-logind.service
triggerun scriptlet (using /bin/sh) -- systemd < 208-2
chgrp -R systemd-journal /var/log/journal || :
chmod 02755 /var/log/journal || :
if [ -f /etc/machine-id ]; then
chmod 02755 /var/log/journal/$(cat /etc/machine-id) || :
fi
triggerposttransin scriptlet (using /bin/sh) -- /usr/lib/tmpfiles.d/*.conf
if [ $1 -eq 1 -o $2 -eq 1 ]; then
while [ -n "$3" ]; do
if [ -f "$3" ]; then
/bin/systemd-tmpfiles --create "$3"
fi
shift
done
fi
triggerposttransun scriptlet (using /bin/sh) -- /usr/lib/tmpfiles.d/*.conf
if [ $2 -eq 0 ]; then
while [ -n "$3" ]; do
if [ -f "$3" ]; then
/bin/systemd-tmpfiles --remove "$3"
fi
shift
done
fi
triggerin scriptlet (using /bin/sh) -- systemd-units < 35-1
# Enable the services we install by default.
/bin/systemctl --quiet enable \
hwclock-load.service \
quotaon.service \
quotacheck.service \
remote-fs.target
systemd-readahead-replay.service \
systemd-readahead-collect.service \
2>&1 || :
# rc-local is now enabled by default in base package
rm -f /etc/systemd/system/multi-user.target.wants/rc-local.service || :
#systemd 195 changed the prototype of logind's OpenSession()
# see http://lists.freedesktop.org/archives/systemd-devel/2012-October/006969.html
# and http://cgit.freedesktop.org/systemd/systemd/commit/?id=770858811930c0658b189d980159ea1ac5663467
triggerin scriptlet (using /bin/sh) -- systemd-units < 208-19.12
# make sure we use preset here
/bin/systemctl --quiet preset \
getty@getty.service \
remote-fs.target \
systemd-readahead-replay.service \
systemd-readahead-collect.service \
console-getty.service \
console-shell.service \
debug-shell.service \
2>&1 || :
/bin/systemctl --quiet stop getty@getty.service 2>&1 || :
/bin/systemctl --quiet disable getty@getty.service 2>&1 || :
/bin/systemctl --quiet stop systemd-readahead-replay.service 2>&1 || :
/bin/systemctl --quiet stop systemd-readahead-collect.service 2>&1 || :
/bin/systemctl --quiet disable systemd-readahead-replay.service 2>&1 || :
/bin/systemctl --quiet disable systemd-readahead-collect.service 2>&1 || :
triggerpostun scriptlet (using /bin/sh) -- systemd-units < 208-10.12
# remove wrong getty target
if [ -d /etc/systemd/system/getty.target.wants/getty@getty.service ]
/bin/systemctl --quiet disable getty@getty.service 2>&1 || :
rm -rf /etc/systemd/system/getty.target.wants ||:
fi
triggerpostun scriptlet (using /bin/sh) -- resolvconf = 1.69-1
# tranform resolv.conf from a symlink back to a file
if [ -L /etc/resolv.conf ] && [ "$(readlink /etc/resolv.conf)" = "/run/resolvconf/resolv.conf" ]; then
rm -f /etc/resolv.conf
mv /run/resolvconf/resolv.conf /etc/resolv.conf
fi
triggerun scriptlet (using /bin/sh) -- iptables < 1.4.12.1
# Autostart
/bin/systemctl --no-reload enable iptables.service >/dev/null 2>&1 ||:
# Delete from sysv management, try to restart service
/sbin/chkconfig --del iptables >/dev/null 2>&1 || :
/bin/systemctl try-restart iptables.service >/dev/null 2>&1 || :
# Autostart
/bin/systemctl --no-reload enable ip6tables.service >/dev/null 2>&1 ||:
# Delete from sysv management, try to restart service
/sbin/chkconfig --del ip6tables >/dev/null 2>&1 || :
/bin/systemctl try-restart ip6tables.service >/dev/null 2>&1 || :
triggerpostun scriptlet (using /bin/sh) -- bash-completion < 2:1.90-3.mga2
# drop dangling symlinks resulting from previous setup
find /etc/bash_completion.d -type l | xargs rm -f
triggerpostun scriptlet (using /bin/sh) -- vim-enhanced < 7.3
update-alternatives --remove uvi /usr/bin/vim-enhanced
triggerin scriptlet (using /bin/sh) -- /usr/share/info/*.info*, /usr/share/info/texinfo.*
if [ $1 -eq 1 -o $2 -eq 1 ]; then
while [ -n "$3" ]; do
if [ -f "$3" ]; then
LESSOPEN="|/usr/bin/lesspipe.sh %s" LESS_ADVANCED_PREPROCESSOR=1 less "$3" | grep -q -e INFO-DIR-SECTION && /sbin/install-info "$3" --dir=/usr/share/info/dir
fi
shift
done
fi
triggerun scriptlet (using /bin/sh) -- /usr/share/info/*.info*, /usr/share/info/texinfo.*
if [ $2 -eq 0 ]; then
while [ -n "$3" ]; do
if [ -f "$3" ]; then
LESSOPEN="|/usr/bin/lesspipe.sh %s" LESS_ADVANCED_PREPROCESSOR=1 less "$3" | grep -q -e INFO-DIR-SECTION && /sbin/install-info "$3" --dir=/usr/share/info/dir --remove
fi
shift
done
fi
triggerposttransin scriptlet (using /bin/sh) -- /usr/uclibc/lib/*.so.*, /usr/uclibc/lib64/*.so.*, /usr/uclibc/usr/lib/*.so.*, /usr/uclibc/usr/lib64/*.so.*
/usr/uclibc/sbin/ldconfig -X
triggerun scriptlet (using /bin/sh) -- chrony < 1.25
if /sbin/chkconfig --level 3 chronyd; then
/bin/systemctl enable chronyd.service &> /dev/null
fi
:
triggerposttransin scriptlet (using /bin/sh) -- /usr/lib/firewalld/services/*.xml
/usr/bin/firewall-cmd --reload --quiet || :
triggerposttransun scriptlet (using /bin/sh) -- /usr/lib/firewalld/services/*.xml
/usr/bin/firewall-cmd --reload --quiet || :
triggerin scriptlet (using /bin/sh) -- /usr/share/applications/*.desktop, /usr/share/applications/*/*.desktop
/usr/bin/update-desktop-database /usr/share/applications > /dev/null 2> /dev/null
triggerpostun scriptlet (using /bin/sh) -- /usr/share/applications/*.desktop, /usr/share/applications/*/*.desktop
/usr/bin/update-desktop-database /usr/share/applications > /dev/null 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment