[oe-commits] org.oe.oz354x altboot: Do not overwrite the config file on upgrades

coredump commit openembedded-commits at lists.openembedded.org
Wed Nov 22 23:51:13 UTC 2006


altboot: Do not overwrite the config file on upgrades

Author: coredump at openembedded.org
Branch: org.openembedded.oz354x
Revision: d57cf54c3d6d55ec48b6e7af6b04183dad2b66e1
ViewMTN: http://monotone.openembedded.org/revision.psp?id=d57cf54c3d6d55ec48b6e7af6b04183dad2b66e1
Files:
1
packages/altboot/altboot_wip.bb
Diffs:

#
# mt diff -r638e42fbf7028f820d0fedd3203f8b7653690693 -rd57cf54c3d6d55ec48b6e7af6b04183dad2b66e1
#
# 
# 
# patch "packages/altboot/altboot_wip.bb"
#  from [eaae6d943c5296a1c5dba0f949d7e6145eb0ae6f]
#    to [c8eed4ae6316aba4a2977f1c0c302593c5cf3e99]
# 
============================================================
--- packages/altboot/altboot_wip.bb	eaae6d943c5296a1c5dba0f949d7e6145eb0ae6f
+++ packages/altboot/altboot_wip.bb	c8eed4ae6316aba4a2977f1c0c302593c5cf3e99
@@ -26,7 +26,7 @@ PV = "1.1.1+wip-${WIP_DATE}"
 WIP_DATE = "20061122"
 
 PV = "1.1.1+wip-${WIP_DATE}"
-PR = "r0"
+PR = "r1"
 
 ######################################################################################
 
@@ -44,7 +44,7 @@ S = "${WORKDIR}/altboot/"
 
 ######################################################################################
 
-FILES_${PN}-conf = "/etc/altboot*.cfg"
+FILES_${PN}-conf = "/etc/skel/altboot/*"
 
 ######################################################################################
 
@@ -55,12 +55,13 @@ do_install() {
 	install -d ${D}/etc/altboot.rc
 	install -d ${D}/usr/share/doc/altboot
 	install -d ${D}/usr/share/sounds
+	install -d ${D}/etc/skel/altboot
 	
 	if test -d ${WORKDIR}/altboot/${MACHINE}
 	then
-		install -m 0644 ${WORKDIR}/altboot/${MACHINE}/altboot*.cfg ${D}/etc
+		install -m 0644 ${WORKDIR}/altboot/${MACHINE}/altboot*.cfg ${D}/etc/skel/altboot/
 	else
-		install -m 0644 ${WORKDIR}/altboot/altboot*.cfg ${D}/etc
+		install -m 0644 ${WORKDIR}/altboot/altboot*.cfg ${D}/etc/skel/altboot/
 	fi
 
 	install -m 0644 ${WORKDIR}/altboot/beep.raw ${D}/usr/share/sounds
@@ -90,6 +91,21 @@ pkg_postinst_${PN}() {
 	update-alternatives --install /sbin/init init /sbin/init.altboot 55
 }
 
+
+pkg_postinst_${PN}-conf() {
+	for kernel in 2.4 2.6
+	do
+		if ! test -e /etc/altboot-${kernel}.cfg
+		then			
+			if test -e /etc/skel/altboot/altboot-${kernel}.cfg
+			then
+				echo "Installing altboot configuration for kernel $kernel..."
+				cp /etc/skel/altboot/altboot-${kernel}.cfg /etc
+			fi
+		fi
+	done		
+}
+
 ######################################################################################
 
 pkg_postrm_${PN}() {






More information about the Openembedded-commits mailing list