Add automatic root filesystem remounting in 'publish' command 52/144152/5
authorDmitriy Nikiforov <d.nikiforov@partner.samsung.com>
Fri, 11 Aug 2017 13:12:57 +0000 (16:12 +0300)
committerDmitriy Nikiforov <d.nikiforov@partner.samsung.com>
Thu, 17 Aug 2017 12:12:08 +0000 (15:12 +0300)
Change-Id: Ib551ff241793131328eda7f75c3a81dc9a676741

infra/commands/publish.sh

index 1fecd2e..6929512 100755 (executable)
@@ -90,8 +90,15 @@ if [[ ! -d ${TARGET_DIR} ]]; then
     exit 1
 fi
 
+# Enable root access and remount root
+echo "Remounting filesystem for writing..."
+
+"${SDB_CMD[@]}" root on
+sdb_shell mount -o rw,remount /
+
+
 # check the device architecture
-echo "Checking architecture..."
+printf "\nChecking architecture...\n"
 
 ARCH=$(get_device_arch)
 if [[ -z ${ARCH} || ! -d ${TARGET_DIR}/${ARCH} ]]; then
@@ -100,7 +107,7 @@ if [[ -z ${ARCH} || ! -d ${TARGET_DIR}/${ARCH} ]]; then
 fi
 
 # check and install, if needed, necessary dependencies
-echo "Checking dependencies..."
+printf "\nChecking dependencies...\n"
 check_and_install_deps "${INSTALL_DEPS}" 'base' 'cpio'
 
 # push debug rpms