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
- SYSTEMCTL1="systemctl enable NetworkManager.service"
- SYSTEMCTL2="systemctl start NetworkManager.service"
- #Varibles to Ensure Configured Usually set to Not Configured until
- #task is done.
- TASK1="[ ] Not Set"
- TASK2="[ ] 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_title6
- echo ""
- echo "${Bold}${White}${Underline}Tux Hat Linux Network Setup${Reset}"
- echo ""
- echo "${Bold}${White} 1. Setup DHCP Systemctl $TASK1"
- echo "${Bold}${White} 2. Setup NetworkManager Systemctl $TASK2"
- echo "${Bold}${White} Q. Quit "
- print_askopt
- read mnuopt
- case $mnuopt in
- 1)
- network_interface
- TASK1="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
- pause_function
- prepmenu
- ;;
- 2)
- $SYSTEMCTL1
- $SYSTEMCTL2
- TASK2="${Bold}${White}[${Bold}${Green}X${Bold}${White}] is Set"
- pause_function
- prepmenu
- ;;
- q)
- echo ""
- echo "${Purple}Now ${Cyan}the ${Blue}Network ${White}DHCP ${Yellow}is ${Green}setup!${Reset}"
- echo ""
- esac
- }
- prepmenu
Advertisement
Add Comment
Please, Sign In to add comment