Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-release > by-pkgid > 20a8340124d2595133d0a0725ad9cff6 > scriptlet

initscripts-9.78-27.mga8.i586.rpm

PREUN

/bin/sh

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


 
if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable --now mandriva-save-dmesg.service mandriva-everytime.service || : 
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

POSTIN

/bin/sh
# (ovitters) remember $1 for usage in posttrans scriptlet as posttrans always
# sets $1 to 1. See see https://bugs.mageia.org/show_bug.cgi?id=19882 and the
# comment in posttrans scriplet
#
# Note: Logic is a bit weird to avoid a dependency on mkdir. The 'mkdir'
# command might not exist in the install case. On upgrade the system will have 
# 'mkdir'. So basically this post scriptlet tells posttrans not to run the
# 'install' logic.
#
# WARNING: Do NOT add a Requires(post) on coreutils! Might cause dependency
# loops (see above bug for detailed discussion
if [ "$1" -ne 1 ]; then
# ignore "mkdir" not found errors
mkdir -p "/var/lib/rpm-state/initscripts.notinstall" 2> /dev/null || :
fi

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
# (ovitters) The posttrans scriptlet always has $1 to 1. This confuses:
# 1. The systemd_post scriplet (makes use of $1).
# 2. Any usage of $1 in posttrans (was used to not call chkconfig)
#
# systemd_post scriptlet only does something when the rpm is installed. 
# Make use of that knowledge to only call these scriptlets when this package is
# first installed. See https://bugs.mageia.org/show_bug.cgi?id=19882
if [ ! -d "/var/lib/rpm-state/initscripts.notinstall" ]; then


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


 
if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then 
        # Initial installation 
        /usr/bin/systemctl --no-reload preset mandriva-save-dmesg.service mandriva-everytime.service || : 
fi 


/sbin/chkconfig --add network;
/sbin/chkconfig --add network-up;
/sbin/chkconfig --add partmon;
/sbin/chkconfig --add netconsole;

# reset the state
rmdir "/var/lib/rpm-state/initscripts.notinstall" 2> /dev/null || :
fi

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

##Fixme
touch /etc/sysconfig/i18n

# 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