SHARE
TWEET

Linux Mint 14 LUKS encryption script

a guest Nov 28th, 2012 960 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. ################################################################################
  4. # Helper script to install an encrypted Linux Mint system (full disk encryption
  5. # using LUKS/LVM)
  6. #
  7. # Tested on the following Linux Mint versions:
  8. # - Linux Mint 14 Nadia (Cinnamon 32/64bit)
  9. # - Linux Mint 14 Nadia (MATE 32/64bit)
  10. #
  11. # Usage:
  12. # 1) Boot a Linux Mint LiveCD/DVD/USB.
  13. #    ATTENTION: Make sure you choose the correct language! This prevents issues
  14. #               with keyboard layouts and your encryption passphrase.
  15. # 3) Make sure this script is executable.
  16. # 3) Call this script with root privileges. (sudo)
  17. #
  18. # LICENSE: This file is open source software (OSS) licensed under the GPLv2 and
  19. #          may be copied under certain conditions. See the links below for
  20. #          details.
  21. #
  22. # Author:          Corey Hinshaw <hinshaw.25@osu.edu>
  23. # Original author: Andreas Haerter <development@andreas-haerter.com>
  24. # License:         GPLv2 (http://www.gnu.org/licenses/gpl2.html)
  25. # Version:         2012-11-28
  26. ################################################################################
  27.  
  28. # Size of boot partition in MB
  29. SIZE_BOOT="256"
  30.  
  31. clear
  32. echo "###############################################################################"
  33. echo "# Helper script to install an encrypted Linux Mint system (full disk encryption"
  34. echo "# using LUKS/LVM)"
  35. echo "# Found system: $(lsb_release -ds)"
  36. echo "#"
  37. echo "# Note:"
  38. echo "# - System must have an active internet connection."
  39. echo "#"
  40. echo "# ATTENTION: THIS SCRIPT WILL ERASE ALL DATA ON THE TARGET DEVICE!"
  41. echo "#            ENSURE THAT IMPORTANT DATA HASN BEEN BACKED UP."
  42. echo "#            USE AT YOUR OWN RISK!"
  43. echo "###############################################################################"
  44.  
  45. if [ $(id -u) -ne 0 ]
  46. then
  47.   echo ""
  48.   echo "ERROR: Must be run as root." 1>&2
  49.   read -n1 -r -p "Press any key to exit..."
  50.   exit 1
  51. fi
  52.  
  53. wget -q --tries=10 --timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null
  54. if [ ! -s /tmp/index.google ]; then
  55.   echo ""
  56.   echo "ERROR: No internet connection detected." 1>&2
  57.   read -n1 -r -p "Press any key to exit..."
  58.   exit 1
  59. fi
  60.  
  61. echo ""
  62. echo "Note: You will be prompted before data on target drive is erased."
  63. echo -n "Start setup now? [y|n]: "
  64. read INPUT
  65. if [ ! "${INPUT}" == "y" ] &&
  66.    [ ! "${INPUT}" == "Y" ]
  67. then
  68.   echo "Operation cancelled by user."
  69.   exit 0
  70. fi
  71.  
  72. echo ""
  73. echo ""
  74. echo "###############################################################################"
  75. echo "# Select target storage device"
  76. echo "###############################################################################"
  77. echo "Enter the storage device on which the operating system will be installed."
  78. echo "(ALL DATA ON THIS DEVICE WILL BE ERASED!)"
  79. echo ""
  80. echo "Note:"
  81. echo "- IDE disks are often adressed as '/dev/hd[a-z]' ('/dev/hda'=1st disk,"
  82. echo "  '/dev/hdb'=2nd disk, '/dev/hdc'=3rd disk etc.)."
  83. echo "- SATA disks are often adressed as '/dev/sd[a-z]' ('/dev/sda'=1st disk,"
  84. echo "  '/dev/sdb'=2nd, '/dev/sdc'=3rd disk etc.)."
  85. echo ""
  86. echo -n "Show system disks? [y|n]: "
  87. read INPUT
  88. if [ "${INPUT}" == "y" ] ||
  89.    [ "${INPUT}" == "Y" ]
  90. then
  91.   echo ""
  92.   echo "DETECTED BLOCK DEVICES:"
  93.   lsblk
  94. fi
  95. echo ""
  96. echo -n "Which device should be used? "
  97. read DEVICE_TARGET
  98. DEVICE_TARGET_OK="n"
  99. while [ ! "${DEVICE_TARGET_OK}" == "y" ] &&
  100.       [ ! "${DEVICE_TARGET_OK}" == "Y" ]
  101. do
  102.   if [ "${DEVICE_TARGET}" != "" ]
  103.   then
  104.     echo -n "You typed '${DEVICE_TARGET}'. Is this correct? [y|n]: "
  105.     read DEVICE_TARGET_OK
  106.   fi
  107.   if [ "${DEVICE_TARGET_OK}" == "y" ] ||
  108.      [ "${DEVICE_TARGET_OK}" == "Y" ]
  109.   then
  110.     break 1
  111.   else
  112.     echo -n "Which device should be used? "
  113.     read DEVICE_TARGET
  114.     continue 1
  115.   fi
  116. done
  117.  
  118.  
  119. let SCR_PHYMEMKB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
  120. let SCR_PHYMEM=`echo "${SCR_PHYMEMKB} / 1024" | bc`
  121. let SCR_RECMEM=`echo "(${SCR_PHYMEM} * 1.3 + 0.5) / 1" | bc`
  122. echo ""
  123. echo ""
  124. echo "###############################################################################"
  125. echo "# Define swap space"
  126. echo "###############################################################################"
  127. echo "Please enter the desired size for your swap partition."
  128. echo "This script requires a minimal value of 256MB for swap, anything lower will not"
  129. echo "be accepted. Enter the size in MB, digits only (e.g. 5200 for 5,200 MB)."
  130. echo ""
  131. echo "Installed memory: ${SCR_PHYMEM} MB"
  132. echo "Recommended swap: ${SCR_RECMEM} MB"
  133. echo ""
  134. echo "NOTE: Remaining free space (=space not allocated by '/boot' and swap) will"
  135. echo "      be used for '/'. A summary will be shown after all needed values are"
  136. echo "      defined."
  137. echo ""
  138. echo -n "Size (in MB) of your swap partition? "
  139. read SIZE_SWAP
  140. SIZE_SWAP_OK="n"
  141. while [ ! "${SIZE_SWAP_OK}" == "y" ] &&
  142.       [ ! "${SIZE_SWAP_OK}" == "Y" ]
  143. do
  144.   if [ "${SIZE_SWAP}" != "" ] &&
  145.      [ ${SIZE_SWAP} -gt 255 ]
  146.   then
  147.     echo -n "You typed '${SIZE_SWAP}'. Is this correct? [y|n]: "
  148.     read SIZE_SWAP_OK
  149.   fi
  150.   if [ "${SIZE_SWAP_OK}" == "y" ] ||
  151.      [ "${SIZE_SWAP_OK}" == "Y" ]
  152.   then
  153.     break 1
  154.   else
  155.     echo -n "Size (in MB) of your swap partition? "
  156.     read SIZE_SWAP
  157.     continue 1
  158.   fi
  159. done
  160. unset SIZE_SWAP_OK
  161.  
  162. echo ""
  163. echo ""
  164. echo "###############################################################################"
  165. echo "# Encryption strength"
  166. echo "###############################################################################"
  167. echo "Using 'aes-xts-plain' with a 256bit key for XTS and AES is recommended on newer"
  168. echo "machines. However, on older hardware, a 128bit key may be a better choice."
  169. echo "Enter the desired key size in bits, digits only (e.g. 256 for 256bit)."
  170. echo ""
  171. echo "Recommended:"
  172. echo "- Single core/slower machine: 128"
  173. echo "- Dual core and above: 256"
  174. echo ""
  175. echo -n "XTS/AES key size (128 or 256)? "
  176. read KEYSIZE
  177. KEYSIZE_OK="n"
  178. while [ ! "${KEYSIZE_OK}" == "y" ] &&
  179.       [ ! "${KEYSIZE_OK}" == "Y" ]
  180. do
  181.   if [ "${KEYSIZE}" == "128" ] ||
  182.      [ "${KEYSIZE}" == "256" ]
  183.   then
  184.     echo -n "You typed '${KEYSIZE}'. Is this correct? [y|n]: "
  185.     read KEYSIZE_OK
  186.   fi
  187.   if [ "${KEYSIZE_OK}" == "y" ] ||
  188.      [ "${KEYSIZE_OK}" == "Y" ]
  189.   then
  190.     break 1
  191.   else
  192.     echo -n "XTS/AES key size (128 or 256)? "
  193.     read KEYSIZE
  194.     continue 1
  195.   fi
  196. done
  197. unset KEYSIZE_OK
  198.  
  199. echo ""
  200. echo ""
  201. echo "###############################################################################"
  202. echo "# Create recovery files"
  203. echo "###############################################################################"
  204. echo "Backing up the LUKS header and creating a recovery passphrase allows you to"
  205. echo "recover your encrypted data in the event you forget your passphrase or the"
  206. echo "storage device becomes corrupted."
  207. echo ""
  208. echo "Selecting yes will create two files in the current working directory."
  209. echo "- LUKS-header.bin: Binary backup of the LUKS header"
  210. echo "- LUKS-keys.txt:   Text file containing the master key and recovery passphrase"
  211. echo ""
  212. echo -n "Create encryption recovery files? [y|n]: "
  213. read CREATE_BACKUP
  214. if [ "${CREATE_BACKUP}" == "y" ] ||
  215.    [ "${CREATE_BACKUP}" == "Y" ]
  216. then
  217.   CREATE_BACKUP='YES'
  218. else
  219.   CREATE_BACKUP='NO'
  220. fi
  221.  
  222. echo ""
  223. echo ""
  224. echo "###############################################################################"
  225. echo "# Shred '${DEVICE_TARGET}'"
  226. echo "###############################################################################"
  227. echo "This will fill the target device with random data prior to setting up the"
  228. echo "encrypted partitions. This ensures that any data previously stored on the disk"
  229. echo "cannot be recovered."
  230. echo ""
  231. echo "Note:"
  232. echo "- This may take a long time"
  233. echo ""
  234. echo -n "Shred '${DEVICE_TARGET}' before encrypting it? [y|n]: "
  235. read SHRED_DEVICE
  236. if [ "${SHRED_DEVICE}" == "y" ] ||
  237.    [ "${SHRED_DEVICE}" == "Y" ]
  238. then
  239.   SHRED_DEVICE='YES'
  240. else
  241.   SHRED_DEVICE='NO'
  242. fi
  243.  
  244. echo ""
  245. echo ""
  246. echo "###############################################################################"
  247. echo "# Start setup?"
  248. echo "###############################################################################"
  249. echo "Target device:   ${DEVICE_TARGET}"
  250. echo "Key size:        ${KEYSIZE}bit"
  251. echo "Size of '/boot': ${SIZE_BOOT}MB"
  252. echo "Size of 'swap':  ${SIZE_SWAP}MB"
  253. echo "Size of '/':     100% of the remaining space not used by '/boot' and swap."
  254. echo "Recovery files?  ${CREATE_BACKUP}"
  255. echo "Shred device?    ${SHRED_DEVICE}"
  256. echo ""
  257. echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
  258. echo "! ATTENTION: ALL DATA ON '${DEVICE_TARGET}' WILL BE ERASED!"
  259. echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
  260. echo -n "Start setup now? [y|n]: "
  261. read INPUT
  262. if [ ! "${INPUT}" == "y" ] &&
  263.    [ ! "${INPUT}" == "Y" ]
  264. then
  265.   echo "Operation cancelled by user."
  266.   exit 0
  267. fi
  268.  
  269. echo ""
  270. echo ""
  271. echo "Installing additional packages and kernel modules..."
  272. apt-get install --yes lvm2 cryptsetup
  273. if [ $? -ne 0 ]
  274. then
  275.   echo "ERROR: Could not install needed software packages." 1>&2
  276.   exit 1
  277. fi
  278. modprobe dm-crypt
  279. if [ $? -ne 0 ]
  280. then
  281.   echo "ERROR: Could not load dm_crypt kernel module." 1>&2
  282.   exit 1
  283. fi
  284. echo "Additional software has been installed."
  285.  
  286. if [ "${SHRED_DEVICE}" == "YES" ]
  287. then
  288.   echo ""
  289.   echo ""
  290.   echo "Shredding target device... THIS MAY TAKE SEVERAL HOURS!"
  291.   echo ""
  292.   sudo shred -vn 1 ${DEVICE_TARGET}
  293.   if [ $? -ne 0 ]
  294.   then
  295.     echo -e "ERROR: Overwriting disk with random data failed." 1>&2
  296.     exit 1
  297.   fi
  298.   echo "Shredding disk complete."
  299. fi
  300.  
  301. echo ""
  302. echo ""
  303. echo "Creating initial partitions on ${DEVICE_TARGET}..."
  304. parted --script ${DEVICE_TARGET} mklabel gpt
  305. if [ $? -ne 0 ]
  306. then
  307.   echo "ERROR: Could not create partition label." 1>&2
  308.   exit 1
  309. fi
  310. parted --script -a optimal ${DEVICE_TARGET} mkpart primary 0% ${SIZE_BOOT}MB
  311. if [ $? -ne 0 ]
  312. then
  313.   echo "ERROR: Could not create boot partition." 1>&2
  314.   exit 1
  315. fi
  316. parted --script -a optimal ${DEVICE_TARGET} mkpart primary ${SIZE_BOOT}MB 100%
  317. if [ $? -ne 0 ]
  318. then
  319.   echo "Could not create main partition." 1>&2
  320.   exit 1
  321. fi
  322. echo "Finished creating partitions."
  323.  
  324. echo ""
  325. echo ""
  326. echo "Initializing encryption..."
  327. let LUKSKEYSIZE=${KEYSIZE}+${KEYSIZE}
  328. #using while loops because the user may enter long, complicated passwords...
  329. if [ "${CREATE_BACKUP}" == "YES" ]
  330. then
  331.   RECOVERY_KEY="`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c20`"
  332.   echo ${RECOVERY_KEY} > LUKS-keys.txt
  333.   echo ${RECOVERY_KEY} | cryptsetup -q --cipher aes-xts-plain --key-size ${LUKSKEYSIZE} luksFormat ${DEVICE_TARGET}2
  334.   echo ${RECOVERY_KEY} | cryptsetup luksAddKey ${DEVICE_TARGET}2 --key-slot=2 LUKS-keys.txt
  335.   echo ""
  336.   echo "Select your encryption passphrase for '${DEVICE_TARGET}2'."
  337.   cryptsetup luksAddKey ${DEVICE_TARGET}2 --key-file=LUKS-keys.txt
  338.   echo ${RECOVERY_KEY} | cryptsetup luksKillSlot ${DEVICE_TARGET}2 2
  339.   echo ${RECOVERY_KEY} | cryptsetup luksOpen ${DEVICE_TARGET}2 system
  340.   if [ $? -ne 0 ]
  341.   then
  342.     echo "ERROR: Could not open encrypted partition." 1>&2
  343.     exit 1
  344.   fi
  345.   echo ${RECOVERY_KEY} | cryptsetup luksHeaderBackup ${DEVICE_TARGET}2 --header-backup-file=LUKS-header.bin
  346.   chmod 644 LUKS-header.bin
  347.   echo "`echo ${RECOVERY_KEY} | cryptsetup luksDump ${DEVICE_TARGET}2 --dump-master-key`" > LUKS-keys.txt
  348.   echo "" >> LUKS-keys.txt
  349.   echo "Recovery passphrase: ${RECOVERY_KEY}" >> LUKS-keys.txt
  350.   echo "cryptsetup was succesful, crypto-device '${DEVICE_TARGET}2' was created."
  351.   echo ""
  352.   echo "Recovery data saved to LUKS-keys.txt and LUKS-header.bin"
  353. else
  354.   DO=1
  355.   while [ $? -ne 0 ] ||
  356.         [ ${DO} -ne 0 ]
  357.   do
  358.     DO=0
  359.     cryptsetup -q --cipher aes-xts-plain --key-size ${LUKSKEYSIZE} --verify-passphrase luksFormat ${DEVICE_TARGET}2
  360.   done
  361.   echo "cryptsetup was succesful, crypto-device '${DEVICE_TARGET}2' was created."
  362.   echo ""
  363.   echo "Unlocking the newly created crypto-device for system insrtallation."
  364.   echo "Please enter the passphrase again."
  365.   DO=1
  366.   while [ $? -ne 0 ] ||
  367.         [ ${DO} -ne 0 ]
  368.   do
  369.     DO=0
  370.     cryptsetup luksOpen ${DEVICE_TARGET}2 system
  371.   done
  372.   unset DO
  373. fi
  374. echo ""
  375. echo "Encrypted partion has been created and unlocked."
  376.  
  377. echo ""
  378. echo ""
  379. echo "Configuring LVM and creating file systems..."
  380. pvcreate /dev/mapper/system
  381. if [ $? -ne 0 ]
  382. then
  383.   echo "ERROR: Could not create physical volume." 1>&2
  384.   exit 1
  385. fi
  386.  
  387. vgcreate vg /dev/mapper/system
  388. if [ $? -ne 0 ]
  389. then
  390.   echo "ERROR: Could not create volume group." 1>&2
  391.   exit 1
  392. fi
  393.  
  394. lvcreate -L ${SIZE_SWAP}M -n swap vg
  395. if [ $? -ne 0 ]
  396. then
  397.   echo "ERROR: Could not create logical volume 'swap'." 1>&2
  398.   exit 1
  399. fi
  400.  
  401. lvcreate -l 100%FREE -n root vg
  402. if [ $? -ne 0 ]
  403. then
  404.   echo "ERROR: Could not create logical volume 'root'." 1>&2
  405.   exit 1
  406. fi
  407.  
  408. mkfs.ext2 ${DEVICE_TARGET}1
  409. if [ $? -ne 0 ]
  410. then
  411.   echo "ERROR: Could not create filesystem on boot partition." 1>&2
  412.   exit 1
  413. fi
  414. mkfs.ext4 /dev/vg/root
  415. if [ $? -ne 0 ]
  416. then
  417.   echo "ERROR: Could not create filesystem on root volume on '/dev/vg/root'." 1>&2
  418.   exit 1
  419. fi
  420. mkswap -L swap /dev/vg/swap
  421. if [ $? -ne 0 ]
  422. then
  423.   echo "ERROR: Could not initialize swap space on '/dev/vg/swap'." 1>&2
  424.   exit 1
  425. fi
  426. echo "Finished creating LVM layout and file systems."
  427. echo ""
  428. echo "NOTE: You can choose other filesystems later. This is just to"
  429. echo "      prevent problems with the graphical installer."
  430.  
  431. clear
  432. echo "###############################################################################"
  433. echo "# Starting operating system installer"
  434. echo "###############################################################################"
  435. echo "We will now launch the graphical installer. Please follow the on-screen prompts."
  436. echo ""
  437. echo "You will have to specify partitions manually. Make sure that:"
  438. echo "- '${DEVICE_TARGET}1' is attached to the mount point '/boot'"
  439. echo "  and will be formatted as EXT3 (recommended) or EXT2"
  440. echo ""
  441. echo "- '/dev/mapper/vg-root' is attached to the mount point '/'"
  442. echo "  and will be formatted as EXT4 (recommended) or another filesystem"
  443. echo ""
  444. echo "- '/dev/mapper/vg-swap' is initialized as swap space"
  445. echo ""
  446. echo "- The boot loader is installed on ${DEVICE_TARGET}"
  447. echo ""
  448. echo ""
  449. echo "ATTENTION: DO NOT REBOOT AFTER THE INSTALLATION HAS FINISHED! CHOOSE"
  450. echo "           'Continue Testing'!"
  451. read -sp "Press [Enter] to continue."
  452. echo ""
  453. echo ""
  454. echo "Starting the graphical installer. Please wait..."
  455. echo "NOTE: Do NOT close this terminal!"
  456. sudo ubiquity --desktop %k gtk_ui > /dev/null 2>&1
  457. if [ $? -ne 0 ]
  458. then
  459.   echo ""
  460.   echo "GNOME UI installer exited with an error."
  461.   echo "Trying KDE interface instead...."
  462.   echo ""
  463.   sudo ubiquity kde_ui > /dev/null 2>&1
  464.   if [ $? -ne 0 ]
  465.   then
  466.     echo "ERROR: Could not run graphical OS installer." 1>&2
  467.     exit 1
  468.   fi
  469. fi
  470. echo ""
  471. sleep 2 #give system some time...
  472. echo "Installation of the OS is complete. Please wait..."
  473. sleep 8 #give system some time...
  474.  
  475. echo ""
  476. echo ""
  477. echo "Configuring the newly installed operating system..."
  478. echo "NOTE: You can probably ignore /etc/crypttab and language warnings."
  479. echo ""
  480. mount /dev/mapper/vg-root /mnt
  481. if [ $? -ne 0 ]
  482. then
  483.   echo "ERROR: Could not mount /dev/mapper/vg-root" 1>&2
  484.   exit 1
  485. fi
  486.  
  487. mount ${DEVICE_TARGET}1 /mnt/boot
  488. if [ $? -ne 0 ]
  489. then
  490.   echo "ERROR: Could not mount ${DEVICE_TARGET}1" 1>&2
  491.   exit 1
  492. fi
  493.  
  494. mount -o bind /dev /mnt/dev
  495. if [ $? -ne 0 ]
  496. then
  497.   echo "ERROR: Could not mount /dev" 1>&2
  498.   exit 1
  499. fi
  500.  
  501. mount -t proc proc /mnt/proc
  502. if [ $? -ne 0 ]
  503. then
  504.   echo "ERROR: Could not mount /proc" 1>&2
  505.   exit 1
  506. fi
  507.  
  508. mount -t sysfs sys /mnt/sys
  509. if [ $? -ne 0 ]
  510. then
  511.   echo "ERROR: Could not mount /sys" 1>&2
  512.   exit 1
  513. fi
  514.  
  515. cp /etc/resolv.conf /mnt/etc/resolv.conf
  516. if [ $? -ne 0 ]
  517. then
  518.   echo "ERROR: Could not copy resolv.conf" 1>&2
  519.   exit 1
  520. fi
  521.  
  522. chroot /mnt /bin/bash  << EOF
  523. apt-get install --yes cryptsetup lvm2
  524. echo "system UUID=$(ls -l /dev/disk/by-uuid | grep $(basename ${DEVICE_TARGET}2) | cut -d ' ' -f 9) none luks" >> /etc/crypttab
  525. update-initramfs -u -k all
  526. exit
  527. EOF
  528. if [ $? -ne 0 ]
  529. then
  530.   echo "ERROR: Configuration of new operating system failed. The system may not boot!" 1>&2
  531.   exit 1
  532. fi
  533. echo "OS configuration complete."
  534.  
  535.  
  536. echo ""
  537. echo ""
  538. echo "###############################################################################"
  539. echo "# Boot-time graphics fix"
  540. echo "###############################################################################"
  541. echo "Some graphics cards may prevent the passphrase prompt from rendering."
  542. echo -n "Try to fix this problem? [y|n]: "
  543. read INPUT
  544. if [ "${INPUT}" == "y" ] ||
  545.    [ "${INPUT}" == "Y" ]
  546. then
  547.   echo "Attempting to resolve boot-time graphics issues. (May not work for all systems)"
  548.   chroot /mnt sed -i -e "s/ \\\\\$vt_handoff//" /etc/grub.d/10_linux
  549.   chroot /mnt update-grub
  550.   if [ $? -ne 0 ]
  551.   then
  552.     echo "Graphics fix may not have been correctly applied." 1>&2
  553.   fi
  554. fi
  555. echo "If your system reboots to a black screen, try typing the passphrase and"
  556. echo "press [Enter]."
  557.  
  558. umount /mnt/sys
  559. umount /mnt/proc
  560. umount /mnt/dev
  561. umount /mnt/boot
  562. umount /mnt
  563.  
  564. echo ""
  565. echo ""
  566. echo "Success! Installation to encrypted drive finished."
  567. if [ "${CREATE_BACKUP}" == "YES" ]
  568. then
  569.   echo "Remember to copy your recovery files to a secure location!"
  570. fi
  571. echo ""
  572. read -n1 -r -p "Press any key to reboot the system..."
  573. echo ""
  574. reboot
  575. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top