return SUCCEED;
}
+static int run_pre_script(void)
+{
+ return try_launch(PRE_SCRIPT_PATH, NULL);
+}
+
static int read_config_file(struct image **image_list)
{
int ret;
ret = mount_recovery_image();
ASSERT_RETV(ret == SUCCEED, ret, "Failed to mount recovery image (%d)", ret);
+ ret = run_pre_script();
+ ASSERT_RETV(ret == SUCCEED, ret, "Failed to run pre script (%d)", ret);
+
ret = read_config_file(&image_list);
ASSERT_RETV(ret == SUCCEED, ret, "Failed to read config file (%d)", ret);
#define IMAGE_VERIFIER_PATH "/usr/sbin/img-verifier"
+#define PRE_SCRIPT_PATH RECOVERY_IMAGE_MOUNTPOINT "/pre.sh"
+
#define LOG_FILE_BASENAME "last_recovery.log"
#define PROGRESS_FILE_PATH "/tmp/recovery_progress"