Commit a7ba12f9 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

bug fix: not creating dir for backup

parent c44b1761
...@@ -172,7 +172,7 @@ function copy_backup(){ ...@@ -172,7 +172,7 @@ function copy_backup(){
exec("ubiattach /dev/ubi_ctrl -m 4"); exec("ubiattach /dev/ubi_ctrl -m 4");
if (!is_dir($UBI_MNT)) mkdir($UBI_MNT); if (!is_dir($UBI_MNT)) mkdir($UBI_MNT);
exec("mount -t ubifs /dev/ubi0_0 $UBI_MNT"); exec("mount -t ubifs /dev/ubi0_0 $UBI_MNT");
if (!is_dir("$UBI_MNT${BKP_DIR}/backup")) mkdir("$UBI_MNT${BKP_DIR}/backup"); if (!is_dir("$UBI_MNT${BKP_DIR}_bkp")) mkdir("$UBI_MNT${BKP_DIR}_bkp");
exec("tar -C ${UBI_MNT}${BKP_DIR}_bkp -xzpf var/$BKP_NAME"); exec("tar -C ${UBI_MNT}${BKP_DIR}_bkp -xzpf var/$BKP_NAME");
exec("sync"); exec("sync");
exec("umount $UBI_MNT"); exec("umount $UBI_MNT");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment