unixwz0r

tuxhat-install

Dec 30th, 2014
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. #!/bin/bash
  2. #-------------------------------------------------------------------------------
  3. #Tux Hat Linux Installer Script
  4. #Developer: Gary Perreault
  5. #-------------------------------------------------------------------------------
  6.  
  7. #Global Settings
  8. ROOTDSK=`df / | sed '1d' | awk '{print $1}'`
  9. BOOTLOADERINSTALL="pacman -S --noconfirm syslinux"
  10. #BOOTLOADERCONFIG="syslinux-install_update -iam"
  11. #BOOTSETUP="nano /boot/syslinux/syslinux.cfg"
  12. #NETGUI="systemctl enable NetworkManager.service"
  13. #NETCMD="systemctl enable [email protected]"
  14. #NETWORKCHECK="ip link show"
  15. HOSTS="nano /etc/hosts"
  16. #HOSTNAME="echo tuxhatlinux > /etc/hostname"
  17. HWCLOCK="hwclock --systohc --utc"
  18. ROOTPWD="passwd"
  19. #EDITPACMAN="nano /etc/pacman.conf"
  20. #CPSKEL="cp -rv . /home/arch /home/${username}"
  21. EDITLOCALE="nano /etc/locale.gen"
  22. THLBASEPKG="pacman -S --noconfirm gtk-engines arch-install-scripts networkmanager gimp openshot ppsspp pcsxr guvcview file-roller smplayer gparted gksu dmenu weechat archey3 feh yaourt awesome vicious nitrogen spacefm lxappearance mc tmux rxvt-unicode rtorrent xmms2 volumeicon network-manager-applet scrot vim geany firefox sudo file-roller lxmusic terminus-font alsa-utils xorg xorg-server xorg-xinit xterm xorg-twm openmotif"
  23. AURBASEPKG="yaourt -S --noconfirm compton"
  24. VISUDO="visudo"
  25. EDITOR=nano
  26.  
  27. # Boot Loader Stuff
  28.  
  29. BOOTLOADER=" "
  30.  
  31. SLFILES="/opt/syslinux" # Contains Syslinux related files
  32. SLTXT="/opt/syslinux/syslinux.txt" # Contains filename list of Syslinux config files on in that directory
  33. SLCFGFILE="/boot/syslinux/syslinux.cfg" # Default config file
  34. CVSPLASH="/opt/syslinux/splash.png" # Current Version Splash
  35.  
  36. #Varibles to Ensure Configured Usually set to Not Configured until
  37. #task is done
  38.  
  39. TASK1="[ ] Not Set"
  40. TASK2="[ ] Not Set"
  41. TASK3="[ ] Not Set"
  42. TASK4="[ ] Not Set"
  43. TASK5="[ ] Not Set"
  44. TASK6="[ ] Not Set"
  45. TASK7="[ ] Not Set"
  46. TASK8="[ ] Not Set"
  47. TASK9="[ ] Not Set"
  48.  
  49. # External Function Files that is required
  50. if [[ -f `pwd`/gfuncs.sh ]]; then
  51. source gfuncs.sh
  52. else
  53. echo "Error missing file: gfuncs.sh - Required for installer"
  54. exit 1
  55. fi
  56.  
  57. if [[ -f `pwd`/diskfuncs.sh ]]; then
  58. source diskfuncs.sh
  59. else
  60. echo "Error missing file: diskfuncs.sh - Required for installer"
  61. exit 1
  62. fi
  63.  
  64. prepmenu() {
  65. print_title2
  66. echo ""
  67. echo "${Bold}${White}${Underline}Tux Hat Linux Prep Setup${Reset}"
  68. echo ""
  69. echo "${Bold}${White} 1. Root Password $TASK1"
  70. echo "${Bold}${White} 2. Create New User $TASK2"
  71. echo "${Bold}${White} 3. Copy Live ISO Skel to newly created User $TASK3"
  72. echo "${Bold}${White} 4. Edit your locale /etc/locale.conf $TASK4"
  73. echo "${Bold}${White} 5. Copy Tux Hat Linux Base packages from pacman $TASK5"
  74. echo "${Bold}${White} 6. Edit sudoers $TASK6"
  75. echo "${Bold}${White} 7. Setup Hwclock $TASK7"
  76. echo "${Bold}${White} 8. Set Hostname & /etc/hosts $TASK8"
  77. echo "${Bold}${White} 9. Setup Bootloader $TASK9"
  78. echo "${Bold}${White} Q. Quit "
  79. print_askopt
  80. read mnuopt
  81.  
  82. case $mnuopt in
  83. 1)
  84. $ROOTPWD
  85. TASK1="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  86. pause_function
  87. prepmenu
  88. ;;
  89. 2)
  90. create_new_user
  91. TASK2="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  92. pause_function
  93. prepmenu
  94. ;;
  95. 3)
  96. cp_skel
  97. TASK3="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  98. pause_function
  99. prepmenu
  100. ;;
  101. 4)
  102. $EDITLOCALE
  103. locale-gen
  104. TASK4="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  105. pause_function
  106. prepmenu
  107. ;;
  108. 5)
  109. $THLBASEPKG
  110. TASK5="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  111. pause_function
  112. prepmenu
  113. ;;
  114. 6)
  115. $VISUDO
  116. TASK6="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  117. pause_function
  118. prepmenu
  119. ;;
  120. 7)
  121. $HWCLOCK
  122. TASK7="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  123. pause_function
  124. prepmenu
  125. ;;
  126. 8)
  127. configure_hostname
  128. $HOSTS
  129. TASK8="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  130. pause_function
  131. prepmenu
  132. ;;
  133. 9)
  134. $BOOTLOADERINSTALL
  135. install_bootloader
  136. TASK9="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
  137. pause_function
  138. prepmenu
  139. ;;
  140. q)
  141. echo ""
  142. echo "${Red}Thanks ${Yellow}for ${Purple}trying ${Green}out ${Yellow}Tux ${Blue}Hat ${White}Linux!${Reset}"
  143. echo ""
  144. esac
  145.  
  146. }
  147.  
  148. #configure_diskspartitions
  149.  
  150. #dfspace
  151.  
  152. prepmenu
Advertisement
Add Comment
Please, Sign In to add comment