Skip to content

Commit

Permalink
v8.23
Browse files Browse the repository at this point in the history
- DietPi-Drive_Manager | Error-handle some more commands, which also helps to see which commands were actually executed by the script
  • Loading branch information
MichaIng committed Oct 2, 2023
1 parent ef13da5 commit c30cb7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dietpi/dietpi-drive_manager
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return
G_DIETPI-NOTIFY 2 "Creating new $partition_table_type partition table"
G_EXEC parted -s "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" mklabel "$partition_table_type"
G_EXEC parted -s "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" mkpart primary 0% 100%
partprobe "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"
partx -u "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"
G_EXEC partprobe "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"
G_EXEC partx -u "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"

# Generate new aDRIVE_MOUNT_SOURCE location to use
# - hda1/sda1/vda1
Expand All @@ -619,7 +619,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return
# force
info_format_fs_type='ext4'
G_EXEC mkfs.ext4 -F -m 0 "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}"
resize2fs "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}"
G_EXEC resize2fs "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}"

# Format NTFS
elif (( $FORMAT_FILESYSTEM_TYPE == 1 )); then
Expand Down Expand Up @@ -751,8 +751,8 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return
[[ $rootfstype_current ]] && G_EXEC sed -i "s#$rootfstype_current#rootfstype=${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]}#g" /boot/boot.ini
fi

systemctl daemon-reload
sync
G_EXEC systemctl daemon-reload
G_EXEC sync

G_WHIP_MSG 'RootFS transfer has successfully completed.\n\nA reboot is required, please press <return> to reboot now.'
reboot
Expand Down

0 comments on commit c30cb7d

Please sign in to comment.