Package systemd-modules-common: Scripts

Post install

src=/etc/modules.rpmsave
dst=/etc/modules-load.d/modules.conf
tmp=$dst.rpmmove
new=$dst.rpmnew
if [ -s $tmp ]; then
        if cmp -s $src $tmp; then
            mv -v -f $dst $new
            mv -v $src $dst
        fi
        rm -f $tmp
fi
Pre install

1
2
3
4
5
6
src=/etc/modules
dst=/etc/modules-load.d/modules.conf.rpmmove
rm -f $dst
if [ -s $src -a ! -L $src ]; then
        cp -a $src $dst
fi