Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #----------------------------------------------------------------------------------------
- # Script Created by Gary Perreault - Tux Hat Linux Project ([email protected])
- # IRC Freenode #bsdgeekclub @UNIXwz0r @Vincent0ne-
- # Distro Sourceforge - https://sourceforge.net/projects/tuxhatlinux/
- # Distro Youtube - https://www.youtube.com/channel/UCDXUtAdTuZSRDFgBHC2gaGA
- # Distro Pastebin - http://pastebin.com/u/unixwz0r
- # Distro Deviantart -http://ipodpunker.deviantart.com/
- # Distro Dailymotion - http://www.dailymotion.com/tuxhatlinux
- #----------------------------------------------------------------------------------------
- #This program is free software: you can redistribute it and/or modify
- #it under the terms of the GNU General Public License as published by
- #the Free Software Foundation, either version 3 of the License, or
- #(at your option) any later version.
- #
- #This program is distributed in the hope that it will be useful,
- #but WITHOUT ANY WARRANTY; without even the implied warranty of
- #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- #GNU General Public License for more details.
- #
- #You should have received a copy of the GNU General Public License
- #along with this program. If not, see <http://www.gnu.org/licenses/>.
- #----------------------------------------------------------------------------------------
- # Run this script after your first boot with archlinux (as root)
- #----------------------------------------------------------------------------------------
- # Explaination of the Script:
- #
- # Setup-Tuxhat using Dialog. The main menu script has like 8 seperate setup scripts.
- #
- # Scripts are listed in # Scripts below
- ##########################################################################################
- # Top program dir is used for testing
- #Global Settings
- ROOTDSK=`df / | sed '1d' | awk '{print $1}'`
- BOOTLOADERINSTALL="pacman -S --noconfirm syslinux"
- STH="setup-tuxhat"
- #BOOTLOADERCONFIG="syslinux-install_update -iam"
- #BOOTSETUP="nano /boot/syslinux/syslinux.cfg"
- #NETGUI="systemctl enable NetworkManager.service"
- #NETCMD="systemctl enable [email protected]"
- #NETWORKCHECK="ip link show"
- HOSTS="nano /etc/hosts"
- #HOSTNAME="echo tuxhatlinux > /etc/hostname"
- HWCLOCK="hwclock --systohc --utc"
- ROOTPWD="passwd"
- #EDITPACMAN="nano /etc/pacman.conf"
- #CPSKEL="cp -rv . /home/arch /home/${username}"
- EDITLOCALE="nano /etc/locale.gen"
- THLBASEPKG="pacman -S --noconfirm --force zsh figlet cowsay dwm conky 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 mesa-demos inxi"
- AURBASEPKG="yaourt -S --noconfirm compton"
- VISUDO="visudo"
- EDITOR=nano
- # Boot Loader Stuff
- BOOTLOADER=" "
- SLFILES="/opt/syslinux" # Contains Syslinux related files
- SLTXT="/opt/syslinux/syslinux.txt" # Contains filename list of Syslinux config files on in that directory
- SLCFGFILE="/boot/syslinux/syslinux.cfg" # Default config file
- CVSPLASH="/opt/syslinux/splash.png" # Current Version Splash
- TITLENAME="Tux Hat Linux Installation Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Tux Hat Linux Setup Script'
- MNT=/mnt
- CONFIGFILE=/home/gary/Test/setup-tuxhat.conf
- if [[ -f $CONFIGFILE ]]; then
- source $CONFIGFILE
- else
- echo "Error missing file: setup-tuxhat.conf - Required by program"
- exit 1
- fi
- ### Program for making the UI
- DIALOG=${DIALOG=dialog}
- #DIALOG=${DIALOG=Xdialog}
- # Temp files
- tmpfile=`tmpfile 2> /dev/null` || tmpfile=/tmp/tmpfile$$
- trap "rm -f $tmpfile" 0 1 2 5 15
- ################
- # Tuxhat-Setup #
- ################
- tuxhatlinuxmenuchoices()
- {
- case $choice in
- "0")
- $ROOTPWD
- ;;
- "1")
- create_new_user
- ;;
- "2")
- cp_skel
- ;;
- "3")
- $EDITLOCALE
- ;;
- "4")
- $THLBASEPKG
- ;;
- "5")
- $VISUDO
- ;;
- "6")
- $HWCLOCK
- ;;
- "7")
- configure_hostname
- $HOSTS
- ;;
- "8")
- $BOOTLOADERINSTALL
- install_bootloader
- ;;
- "9")
- cdmhddfiles
- ;;
- esac
- }
- tuxhatlinuxmenu() # Arch Linux Base Main Menu Setup
- {
- while :
- do
- DIALOGRC="$DIALOGRC" $DIALOG --backtitle "$DISTNAME$DISTVER $DASH $SCRIPTNAME " --no-shadow \
- --ok-label 'Select' --cancel-label 'Exit' \
- --title "$TITLENAME" --menu "Select Task 0-9 to Setup Tux Hat Linux Installation" 17 57 26 \
- "0" "Root Password" \
- "1" "Create New User" \
- "2" "Copy Live ISO Skel to newly created User" \
- "3" "Edit your locale /etc/locale.conf" \
- "4" "Copy Tux Hat Linux Base packages from pacman" \
- "5" "Edit sudoers" \
- "6" "Setup Hwclock" \
- "7" "Set Hostname & /etc/hosts" \
- "8" "Setup Bootloader" \
- "9" "Setup Console Display Manager" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- tuxhatlinuxmenuchoices
- ;;
- 1)
- if DIALOGRC="$DIALOGRC" $DIALOG --yesno "Do you want to exit?\n" 5 24
- then
- exit 0
- fi
- ;;
- 255)
- # echo "ESC key pressed"
- ;;
- esac
- done
- }
- ########################################################################
- #
- # End of Script -- Tux Hat Linux Development -- UNIXwz0r
- #
- ########################################################################
- tuxhatlinuxmenu
Advertisement
Add Comment
Please, Sign In to add comment