echo "Attribute generation for ${TARGET} [START] $(date +%T)"
- sudo find ./${BASE_DIR_OLD} -type f -printf '"/%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_OLD} -type l -printf '"/%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_OLD} -type d -printf '"/%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
+ sudo find ./${BASE_DIR_OLD} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V1_ATTR_FILE}
+ sudo find ./${BASE_DIR_OLD} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
+ sudo find ./${BASE_DIR_OLD} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type f -printf '"/%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V2_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type l -printf '"/%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type d -printf '"/%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
+ sudo find ./${BASE_DIR_NEW} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V2_ATTR_FILE}
+ sudo find ./${BASE_DIR_NEW} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
+ sudo find ./${BASE_DIR_NEW} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
################ Change user and group permission from '0' to '0000' ############
sed -i 's/: 0/:0000/g' ${V1_ATTR_FILE}
sed -i 's/: /:0/g' ${V2_ATTR_FILE}
################ Change ":./old" to "/" ############
- sed -i "s/:.\/${BASE_DIR_OLD}\//:\//" ${V1_ATTR_FILE}
- sed -i "s/:.\/${BASE_DIR_OLD}/:\//" ${V1_ATTR_FILE}
- sed -i "s/:.\/${BASE_DIR_NEW}\//:\//" ${V2_ATTR_FILE}
- sed -i "s/:.\/${BASE_DIR_NEW}/:\//" ${V2_ATTR_FILE}
+ sed -i "s/:.\/${BASE_DIR_OLD}\//:/" ${V1_ATTR_FILE}
+ sed -i "s/:.\/${BASE_DIR_OLD}/:/" ${V1_ATTR_FILE}
+
+ sed -i "s/:.\/${BASE_DIR_NEW}\//:/" ${V2_ATTR_FILE}
+ sed -i "s/:.\/${BASE_DIR_NEW}/:/" ${V2_ATTR_FILE}
echo "Attribute generation for ${TARGET} [END] $(date +%T)"
}
DEBUG_DELTA=debug_${DELTA}
#CFG_XML=${PART_NAME}_FS.xml
- FAKE_ROOT=run/upgrade-sysroot
BASE_OLD=${PART_NAME}_OLD
BASE_NEW=${PART_NAME}_NEW
case "${PART_NAME}" in
"rootfs" )
EXCLUDE_FILES="lost+found dev proc tmp var sys csa"
- TGT_MNT_PNT=${FAKE_ROOT}
-
;;
"ramdisk1" | "ramdisk" )
EXCLUDE_FILES="lost+found dev proc tmp sys"
- TGT_MNT_PNT=${FAKE_ROOT}/mnt/initrd
;;
"ramdisk2" | "ramdisk-recovery" )
EXCLUDE_FILES="lost+found"
- TGT_MNT_PNT=${FAKE_ROOT}/mnt/initrd-recovery
;;
"user" )
EXCLUDE_FILES="lost+found"
- TGT_MNT_PNT=${FAKE_ROOT}/opt/usr
;;
"system-data" )
EXCLUDE_FILES="lost+found"
- TGT_MNT_PNT=${FAKE_ROOT}/opt
;;
"kernel" | "boot" )
EXCLUDE_FILES=""
- TGT_MNT_PNT=${FAKE_ROOT}/boot
;;
"hal" )
EXCLUDE_FILES=""
- TGT_MNT_PNT="${FAKE_ROOT}/hal"
;;
* )
;;
esac
- MNT_PNT_OLD=${BASE_OLD}/${TGT_MNT_PNT}
- MNT_PNT_NEW=${BASE_NEW}/${TGT_MNT_PNT}
+ MNT_PNT_OLD=${BASE_OLD}/
+ MNT_PNT_NEW=${BASE_NEW}/
fn_gen_metadata
fn_mk_delta_fs_core