diff --git a/clone/clone b/clone/clone index 3b00ec1..298c1c0 100755 --- a/clone/clone +++ b/clone/clone @@ -39,7 +39,7 @@ DEV="$1"; # [1] Init device layout (gpt table) #========================================================# step1(){ - echo "\n>>> [1] Checking for mounted partitions ($DEV)"; + echo -e "\n>>> [1] Checking for mounted partitions ($DEV)"; # (1) List partitions of this device # mounted_partitions=$( cat /proc/mounts | awk '{print $1}' | grep "$DEV" ); @@ -66,7 +66,7 @@ step1(){ # [2] Initialize GTP Table #========================================================# step2(){ - echo "\n>>> [2] Formatting disk ($DEV)"; + echo -e "\n>>> [2] Formatting disk ($DEV)"; # (1) Confirmation # read -p" (!) Erase the whole disk ? it is irreversible! (y/n) [n]" confirm_format; @@ -90,7 +90,7 @@ step2(){ # [3] Burn image to device #========================================================# step3(){ - echo "\n>>> [3] Burning image into disk ($DEV)"; + echo -e "\n>>> [3] Burning image into disk ($DEV)"; # (1) Confirmation # read -p" (!) Burn the whole disk ? it is irreversible! (y/n) [n]" confirm_burn; @@ -114,7 +114,7 @@ step3(){ # [4] Mount partition #========================================================# step4(){ - echo "\n>>> [4] Mounting partition ${DEV}2"; + echo -e "\n>>> [4] Mounting partition ${DEV}2"; # [1] Mount device partition sudo mount ${DEV}2 /mnt || $( echo "<<< error: can't mount" && exit ); @@ -132,7 +132,7 @@ step4(){ # [5] Updating users #========================================================# step5(){ - echo "\n>>> [5] Updating users' structure"; + echo -e "\n>>> [5] Updating users' structure"; # (1) emulate `useradd sats` # echo " (.) emulate \`useradd sats\`"; @@ -167,7 +167,7 @@ step5(){ # [6] Manage SSH keys # #========================================================# step6(){ - echo "\n>>> [6] Manage ssh keys"; + echo -e "\n>>> [6] Manage ssh keys"; # (1) Create ssh key pair # echo " (.) Create ssh key [ecdsa:521]"; @@ -225,7 +225,7 @@ step6(){ # [7] Set up systemd services #========================================================# step7(){ - echo "\n>>> [7] Set up systemd background"; + echo -e "\n>>> [7] Set up systemd background"; # (1) Create link in order to be handled # @@ -266,12 +266,9 @@ step7(){ # [8] Manage Network config #========================================================# step8(){ - echo "\n>>> [8] Set up WiFi configuration"; + echo -e "\n>>> [8] Set up WiFi configuration"; - echo $WIFI_SSID; - echo "network={\n\tssid=\"${WIFI_SSID}\"\n\tpsk=\"$WIFI_PASS\"\n}"; - exit; - echo "network={\n\tssid=\"$WIFI_SSID\"\n\tpsk=\"$WIFI_PASS\"\n}" | sudo tee -a /mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null; + echo -e "network={\n\tssid=\"$WIFI_SSID\"\n\tpsk=\"$WIFI_PASS\"\n}" | sudo tee -a /mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null; echo "<<< done"; @@ -287,7 +284,7 @@ step8(){ #========================================================# step9(){ - echo "\n>>> [9] Set up SATS operating folder"; + echo -e "\n>>> [9] Set up SATS operating folder"; # (1) Create operating folder # @@ -344,7 +341,7 @@ step10(){ # [0] Step choice #========================================================# -echo "\nSTEPS"; +echo -e "\nSTEPS"; echo "(1) Unmount mounted partitions"; echo "(2) Format disk (gpt table)"; echo "(3) Burn image into disk";