Advertisement
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 Stuff
- TITLENAME="Arch Linux Base Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Arch Setup Script'
- PACSTRAPDEFAULTS="base base-devel"
- 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
- ##############
- # Arch-Setup #
- ##############
- archlinuxmenuchoices(){
- case $choice in
- "1")
- SelectDisk
- archlinuxmenu
- ;;
- "2")
- PartitionDisks
- archlinuxmenu
- ;;
- "3")
- formatrootpart
- archlinuxmenu
- ;;
- "4")
- /home/gary/Test/test
- ;;
- "5")
- pacstrap $MNT $PACSTRAPDEFAULTS
- archlinuxmenu
- ;;
- "6")
- genfstab -U -p $MNT >> $MNT/etc/fstab
- archlinuxmenu
- ;;
- "7")
- arch-chroot $MNT
- ;;
- esac
- }
- archlinuxmenu() # 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 1-7 to Setup Arch Linux Base" 14 45 26 \
- "1" "Select Disk" \
- "2" "Partition Selected Disk" \
- "3" "Format & Mount Root Partition" \
- "4" "Copy Live ISO Skel to Disk" \
- "5" "Pacstrap base base-devel /mnt" \
- "6" "Generate Fstab" \
- "7" "Chroot in to the new root" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- archlinuxmenuchoices
- ;;
- 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
- #
- ########################################################################
- archlinuxmenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement