Check files
This commit is contained in:
parent
dde8e0fcf3
commit
7f970fe02c
|
@ -112,24 +112,29 @@ function restore_configuration {
|
|||
temp_restore_dir=/root/tempconfig
|
||||
restore_directory_from_usb $temp_restore_dir config
|
||||
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
set_user_permissions
|
||||
backup_unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 5294
|
||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
set_user_permissions
|
||||
backup_unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 5294
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $CONFIGURATION_FILE ]; then
|
||||
# install according to the config file
|
||||
freedombone -c $CONFIGURATION_FILE
|
||||
fi
|
||||
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
set_user_permissions
|
||||
backup_unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 6382
|
||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
set_user_permissions
|
||||
backup_unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 6382
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then
|
||||
|
|
|
@ -119,22 +119,27 @@ function restore_configuration {
|
|||
temp_restore_dir=/root/tempconfig
|
||||
restore_directory_from_friend $temp_restore_dir config
|
||||
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 5372
|
||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 5372
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $CONFIGURATION_FILE ]; then
|
||||
# install according to the config file
|
||||
freedombone -c $CONFIGURATION_FILE
|
||||
fi
|
||||
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 7252
|
||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
|
||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
|
||||
if [ ! "$?" = "0" ]; then
|
||||
unmount_drive
|
||||
rm -rf $temp_restore_dir
|
||||
exit 7252
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then
|
||||
|
|
Loading…
Reference in New Issue