diff --git a/config/common.mk b/config/common.mk index 57b81f81..03f6225b 100644 --- a/config/common.mk +++ b/config/common.mk @@ -24,8 +24,11 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_COPY_FILES += \ vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt +# Backup Tool PRODUCT_COPY_FILES += \ - vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh + vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \ + vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \ + vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh # init.d support PRODUCT_COPY_FILES += \ @@ -116,4 +119,4 @@ endif PRODUCT_PROPERTY_OVERRIDES += \ ro.cm.version=$(CM_VERSION) \ - ro.modversion=$(CM_VERSION) \ No newline at end of file + ro.modversion=$(CM_VERSION) diff --git a/prebuilt/common/bin/50-cm.sh b/prebuilt/common/bin/50-cm.sh new file mode 100755 index 00000000..24bfe332 --- /dev/null +++ b/prebuilt/common/bin/50-cm.sh @@ -0,0 +1,41 @@ +#!/sbin/sh +# +# /system/addon.d/50-cm.sh +# During a CM9 upgrade, this script backs up /system/etc/hosts, +# /system is formatted and reinstalled, then the file is restored. +# + +. /tmp/backuptool.functions + +list_files() { +cat < $C/fixed_custom_backup_list.txt - L=`cat $C/fixed_custom_backup_list.txt` - cat <