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
- UPDATEPACMAN="pacman -Syy"
- VBOXGUESTPKG="pacman -S --noconfirm virtualbox-guest-modules virtualbox-guest-utils"
- VBOXMODPROBE="modprobe -a vboxguest vboxsf vboxvideo"
- STH="setup-tuxhat"
- TITLENAME="Tux Hat Linux Virtualbox Guest Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Virtualbox Guest 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
- ##############
- # Vbox-Setup #
- ##############
- vboxsetupmenuchoices()
- {
- case $choice in
- "1")
- $UPDATEPACMAN
- vboxsetupmenu
- ;;
- "2")
- $VBOXGUESTPKG
- vboxsetupmenu
- ;;
- "3")
- $VBOXMODPROBE
- setuptuxhatmenu
- ;;
- esac
- }
- vboxsetupmenu() # Virtualbox Guest 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-3 to setup Virtualbox Guest" 10 46 26 \
- "1." "Update Pacman" \
- "2." "Install Virtualbox Guest additions" \
- "3." "Load Virtualbox Guest Modules" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- vboxsetupmenuchoices
- ;;
- 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
- #
- ########################################################################
- vboxsetupmenu
- #!/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
- UPDATEPACMAN="pacman -Syy"
- VBOXGUESTPKG="pacman -S --noconfirm virtualbox-guest-modules virtualbox-guest-utils"
- VBOXMODPROBE="modprobe -a vboxguest vboxsf vboxvideo"
- STH="setup-tuxhat"
- TITLENAME="Tux Hat Linux Virtualbox Guest Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Virtualbox Guest 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
- ##############
- # Vbox-Setup #
- ##############
- vboxsetupmenu() # Virtualbox Guest 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-3 to setup Virtualbox Guest" 10 46 26 \
- "1." "Update Pacman" \
- "2." "Install Virtualbox Guest additions" \
- "3." "Load Virtualbox Guest Modules" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- vboxsetupmenuchoices
- ;;
- 1)
- if DIALOGRC="$DIALOGRC" $DIALOG --yesno "Wanna Exit?\n" 10 20
- then
- exit 0
- fi
- ;;
- 255)
- # echo "ESC key pressed"
- ;;
- esac
- done
- }
- ##### Arch Linux Base Choices Responses
- vboxsetupmenuchoices()
- {
- case $choice in
- "Update Pacman")
- $UPDATEPACMAN
- vboxsetupmenu
- ;;
- "Install Virtualbox Guest additions")
- $VBOXGUESTPKG
- vboxsetupmenu
- ;;
- "Load Virtualbox Guest Modules")
- $VBOXMODPROBE
- setuptuxhatmenu
- ;;
- esac
- }
- ########################################################################
- #
- # End of Script -- Tux Hat Linux Development -- UNIXwz0r
- #
- ########################################################################
- vboxsetupmenu
Advertisement
Add Comment
Please, Sign In to add comment