Browse Source

Moved sfdisk-script content to newdisk-automator.sh to be used as heredoc

Matteo Zeccoli Marazzini 5 years ago
parent
commit
4f50beb5e2
2 changed files with 11 additions and 13 deletions
  1. 11 3
      newdisk-automator.sh
  2. 0 10
      sfdisk-script

+ 11 - 3
newdisk-automator.sh

@@ -3,7 +3,15 @@ SWAP_SIZE=$2
 CONDOR_SIZE=$3
 TEMP_SIZE=$4
 VM_SIZE=$5
-SFDISK_SCRIPT=sfdisk-script
 
-# sfdisk partitions the disk following instruction in the $SFDISK_SCRIPT
-sfdisk $DEVICE < $SFDISK_SCRIPT
+# oartitioning the disk
+sfdisk $DEVICE <<-sfdisk-script-end
+	# Create a new partition table on the specified disk, and create a new Linux LVM partition
+	#
+	# partition table info
+	label: gpt
+	#
+	# partitions info
+	#start	size	type	bootable
+		,	,31	,
+sfdisk-script-end

+ 0 - 10
sfdisk-script

@@ -1,10 +0,0 @@
-#sfdisk-script
-#This script is to be passed as standard input to sfdisk
-#It creates a new partition table on the specified disk, and create a new Linux LVM partition
-#
-#partition table info
-label: gpt
-#
-#partitions info
-#start	size	type	bootable
-	,	,31	,