Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #-------------------------------------------------------------------------------
- #Tux Hat Linux Installer Script
- #Developer: Gary Perreault
- #-------------------------------------------------------------------------------
- #Global Settings
- UPDATEPACMAN="pacman -Syy"
- VBOXGUESTPKG="pacman -S --noconfirm virtualbox-guest-modules virtualbox-guest-utils"
- VBOXMODPROBE="modprobe -a vboxguest vboxsf vboxvideo"
- #Varibles to Ensure Configured Usually set to Not Configured until
- #task is done.
- TASK1="[ ] Not Set"
- TASK2="[ ] Not Set"
- TASK3="[ ] Not Set"
- # External Function Files that is required
- if [[ -f `pwd`/gfuncs.sh ]]; then
- source gfuncs.sh
- else
- echo "Error missing file: gfuncs.sh - Required for installer"
- exit 1
- fi
- if [[ -f `pwd`/diskfuncs.sh ]]; then
- source diskfuncs.sh
- else
- echo "Error missing file: diskfuncs.sh - Required for installer"
- exit 1
- fi
- prepmenu() {
- print_title7
- echo ""
- echo "${Bold}${White}${Underline}Tux Hat Linux Virtualbox Guest Setup${Reset}"
- echo ""
- echo "${Bold}${White} 1. Update Pacman $TASK1"
- echo "${Bold}${White} 2. Install Virtualbox Guest additions $TASK2"
- echo "${Bold}${White} 3. Load Virtualbox Guest Modules $TASK3"
- echo "${Bold}${White} Q. Quit "
- print_askopt
- read mnuopt
- case $mnuopt in
- 1)
- $UPDATEPACMAN
- TASK1="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
- pause_function
- prepmenu
- ;;
- 2)
- $VBOXGUESTPKG
- TASK2="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
- pause_function
- prepmenu
- ;;
- 3)
- $VBOXMODPROBE
- TASK3="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
- pause_function
- prepmenu
- ;;
- q)
- echo ""
- echo "${Purple}Now ${Cyan}the ${Blue}Virtualbox ${White}Guest ${Yellow}Additions ${Green}is ${Red}configured!${Reset}"
- echo ""
- esac
- }
- prepmenu
Advertisement
Add Comment
Please, Sign In to add comment