Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > c6cd4342a2aadf29539079ba06eeeb54 > scriptlet

initscripts-9.78-10.mga7.x86_64.rpm

PREUN

/bin/sh

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable --now fedora-import-state.service fedora-loadmodules.service fedora-readonly.service > /dev/null 2>&1 || : 
fi 


if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable --now mandriva-save-dmesg.service mandriva-everytime.service > /dev/null 2>&1 || : 
fi 


/usr/share/rpm-helper/del-service initscripts $1 netconsole 


/usr/share/rpm-helper/del-service initscripts $1 dm 


/usr/share/rpm-helper/del-service initscripts $1 network-up 


/usr/share/rpm-helper/del-service initscripts $1 network 


/usr/share/rpm-helper/del-service initscripts $1 partmon

POSTUN

/bin/sh
if [ -f /var/lock/TMP_1ST ];then 
		rm -f /var/lock/TMP_1ST
fi
if [ "$1" = "0" ]; then
	for i in /etc/locale/*/LC_MESSAGES/initscripts.mo
	do
		rm -f $i
		rmdir `dirname $i` >/dev/null 2> /dev/null
	done
	rmdir /etc/locale/* >/dev/null 2> /dev/null
fi

POSTTRANS

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl --no-reload preset fedora-import-state.service fedora-loadmodules.service fedora-readonly.service >/dev/null 2>&1 || : 
fi 


if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl --no-reload preset mandriva-save-dmesg.service mandriva-everytime.service >/dev/null 2>&1 || : 
fi 


if [ $1 -eq 1 ]; then

/sbin/chkconfig --add network;

/sbin/chkconfig --add network-up;

fi

/usr/bin/systemd-tmpfiles --create initscripts.conf 

##Fixme
touch /etc/sysconfig/i18n
##
touch /var/log/wtmp /var/log/btmp
chown root:utmp /var/log/wtmp /var/log/btmp
chmod 664 /var/log/wtmp
chmod 600 /var/log/btmp

/sbin/chkconfig --add partmon;

/sbin/chkconfig --add netconsole;

# /etc/sysconfig/desktop format has changed
if [ -r /etc/sysconfig/desktop ]; then
    if ! grep -q = /etc/sysconfig/desktop; then
        DESK=`cat /etc/sysconfig/desktop`
        echo "DESKTOP=$DESK" > /etc/sysconfig/desktop
    fi
fi

# Add right translation file
for i in `echo $LANGUAGE:$LC_ALL:$LC_COLLATE:$LANG:C | tr ':' ' '`
do
	if [ -r /usr/share/locale/$i/LC_MESSAGES/initscripts.mo ]; then
		mkdir -p /etc/locale/$i/LC_MESSAGES/
		cp /usr/share/locale/$i/LC_MESSAGES/initscripts.mo \
			/etc/locale/$i/LC_MESSAGES/
                #
		# warly
		# FIXME: this should be done by each locale when installed or upgraded
		#
		pushd /usr/share/locale/$i/ > /dev/null && for j in LC_*
		do
			if [ -r $j -a ! -d $j ]; then
			    cp $j /etc/locale/$i/
			fi
		done && popd > /dev/null
		if [ -r /usr/share/locale/$i/LC_MESSAGES/SYS_LC_MESSAGES ]; then
			cp /usr/share/locale/$LANG/LC_MESSAGES/SYS_LC_MESSAGES /etc/locale/$i/LC_MESSAGES/
		fi
		#
		#
		break
	fi
done


# only needed on upgrade
if [ $1 != 0 ]; then
	# Handle boot sequence changes on upgrade
	if [[ -f /etc/rc3.d/S80partmon ]] && [[ -f /etc/rc5.d/S80partmon ]] && egrep -q 'chkconfig: [0-9]+ 13' /etc/init.d/partmon; then chkconfig --add partmon || : ; fi; 

fi

Triggers

initscripts < 9.78-5

/bin/sh
if [ $1 -gt 1 ]; then
  systemctl enable fedora-import-state.service fedora-loadmodules.service fedora-readonly.service &> /dev/null || :
  echo -e "\nUPGRADE: Automatically re-enabling default systemd units: fedora-import-state.service fedora-loadmodules.service fedora-readonly.service\n" || :
  systemctl enable mandriva-save-dmesg.service mandriva-everytime.service &> /dev/null || :
  echo -e "\nUPGRADE: Automatically re-enabling default systemd units: mandriva-save-dmesg.service mandriva-everytime.service\n" || :
  # transition prefdm to systemd preset
  if [ -f /etc/sysconfig/desktop ]; then
    source /etc/sysconfig/desktop >/dev/null 2>&1
    [ -z "$DISPLAYMANAGER" ] && DISPLAYMANAGER=$DESKTOP
    if [ "$DISPLAYMANAGER" = "GDM" -o "$DISPLAYMANAGER" = "gdm" -o "$DISPLAYMANAGER" = "GNOME" -o "$DISPLAYMANAGER" = "gnome" -o "$DISPLAYMANAGER" = "Gnome" ]; then
      dm=gdm
    elif [ "$DISPLAYMANAGER" = "SDDM" -o "$DISPLAYMANAGER" = "sddm" -o "$DISPLAYMANAGER" = "PLASMA5" -o "$DISPLAYMANAGER" = "plasma5" ]; then
      dm=sddm
    elif [ "$DISPLAYMANAGER" = "KDM" -o "$DISPLAYMANAGER" = "kdm" -o "$DISPLAYMANAGER" = "KDE" -o "$DISPLAYMANAGER" = "kde" ]; then
      # Automatically transition kdm to sddm...
      dm=sddm
    elif [ -n "$DISPLAYMANAGER" ]; then
      dm="$(echo $DISPLAYMANAGER | tr '[:upper:]' '[:lower:]')"
    fi
    systemctl --force enable ${dm}.service
    echo -e "\nUPGRADE: Automatically enabling set display manager systemd unit with prefdm transition: ${dm}.service\n" || :
  fi  
fi



# (cg) Clean up danging symlinks after initscript removal