Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 17829
Collapse All | Expand All

(-)baselayout-1.8.6.4.ebuild (-24 / +15 lines)
Lines 576-607 Link Here
576
	if [ -z "`use build`" -a -z "`use bootstrap`" ]
576
	if [ -z "`use build`" -a -z "`use bootstrap`" ]
577
	then
577
	then
578
		local oldsvcdir="${svcdir}"
578
		local oldsvcdir="${svcdir}"
579
		local rcconfd="`ls ${ROOT}/etc/conf.d/._cfg????_rc 2> /dev/null`"
579
		local rcconfd="/etc/conf.d/rc"
580
		local inittab="`ls ${ROOT}/etc/._cfg????_inittab 2> /dev/null`"
580
		local inittab="/etc/inittab"
581
581
582
		# Replace and backup /etc/conf.d/rc if needed ...
582
		# Replace and backup /etc/conf.d/rc ...
583
		if [ -f "${rcconfd}" ] && \
583
		ewarn "Backing up your old /etc/conf.d/rc, and replacing with new!"
584
		   ([ -z "`grep 'svcmount' ${ROOT}/etc/conf.d/rc`" ] || \
584
		ewarn "This is needed, as \$svcdir moved from /mnt/.init.d to"
585
		    [ -z "`grep 'svcdir' ${ROOT}/etc/conf.d/rc | grep 'var\/lib\/init.d'`" ])
585
		ewarn "/var/state/init.d"
586
		then
586
		echo
587
			ewarn "Backing up your old /etc/conf.d/rc, and replacing with new!"
587
		cp -f "${ROOT}/${rcconfd}" "${ROOT}/${rcconfd}.old"
588
			ewarn "This is needed, as \$svcdir moved from /mnt/.init.d to"
588
		cp -f "${S}/${rcconfd}" "${ROOT}/${rcconfd}"
589
			ewarn "/var/state/init.d"
590
			echo
591
			cp -f "${ROOT}/etc/conf.d/rc" "${ROOT}/etc/conf.d/rc.old"
592
			mv -f "${rcconfd}"  "${ROOT}/etc/conf.d/rc"
593
		fi
594
589
595
		# Replace and backup /etc/inittab if needed ...
590
		# Replace and backup /etc/inittab ...
596
		if [ -f "${inittab}" ] && \
591
		ewarn "Backing up your old /etc/inittab, and replacing with new!"
597
		   [ -z "`grep 'si::sysinit:/sbin/rc sysinit' /etc/inittab`" ]
592
		ewarn "This is needed, as there was critical changes to /sbin/rc."
598
		then
593
		echo
599
			ewarn "Backing up your old /etc/inittab, and replacing with new!"
594
		cp -f "${ROOT}/${inittab}" "${ROOT}/${inittab}.old"
600
			ewarn "This is needed, as there was critical changes to /sbin/rc."
595
		cp -f "${S}/${inittab}" "${ROOT}/${inittab}"
601
			echo
602
			cp -f "${ROOT}/etc/inittab" "${ROOT}/etc/inittab.old"
603
			mv -f "${inittab}"  "${ROOT}/etc/inittab"
604
		fi
605
596
606
		source ${ROOT}/etc/conf.d/rc
597
		source ${ROOT}/etc/conf.d/rc
607
598

Return to bug 17829