Skip to content

Commit

Permalink
Merge pull request #182 from 007revad/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
007revad authored Dec 24, 2024
2 parents 4a3ab2c + e36079a commit 5b2e69b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v2.0.29
- v2 and later are for DSM 7 only.
- For DSM 6 use v1 without the auto update option.
- Improved checking if creating storage was okay.
- Now skips exiting if creating storage pool failed. Issue #171

v2.0.28
- v2 and later are for DSM 7 only.
- For DSM 6 use v1 without the auto update option.
Expand Down
21 changes: 13 additions & 8 deletions syno_create_m2_volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# mdisk array contains list of selected nvme#n#


scriptver="v2.0.28"
scriptver="v2.0.29"
script=Synology_M2_volume
repo="007revad/Synology_M2_volume"
scriptname=syno_create_m2_volume
Expand Down Expand Up @@ -145,6 +145,7 @@ selectdisk(){
;;
*)
echo -e "${Red}Invalid answer!${Off} Try again." >&2
#echo -e "There is no menu item $?)" >&2
selected_disk=""
;;
esac
Expand Down Expand Up @@ -407,7 +408,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" |

# Copy new CHANGES.txt file to script location (if script on a volume)
if [[ $scriptpath =~ /volume* ]]; then
# Set permsissions on CHANGES.txt
# Set permissions on CHANGES.txt
if ! chmod 664 "/tmp/$script-$shorttag/CHANGES.txt"; then
permerr=1
echo -e "${Error}ERROR${Off} Failed to set permissions on:"
Expand Down Expand Up @@ -893,15 +894,19 @@ fi
echo -e "\nStarting creation of the storage pool."
if [[ $drivecheck != "yes" ]]; then
synostgpool --create "$@" -l "$raidtype" "${partargs[@]}"
if [[ $? -gt "0" ]]; then
echo "$? synostgpool failed to create storage pool!"
exit 1
code="$?"
if [[ $code -gt "0" ]]; then
ding
echo "$code synostgpool failed to create storage pool!"
#exit 1
fi
else
synostgpool --create "$@" -l "$raidtype" -c "${partargs[@]}"
if [[ $? -gt "0" ]]; then
echo "$? synostgpool failed to create storage pool!"
exit 1
code="$?"
if [[ $code -gt "0" ]]; then
ding
echo "$code synostgpool failed to create storage pool!"
#exit 1
fi
fi

Expand Down

0 comments on commit 5b2e69b

Please sign in to comment.