summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rwxr-xr-xinit56
1 files changed, 48 insertions, 8 deletions
diff --git a/init b/init
index 159fe6a..3d6b6b3 100755
--- a/init
+++ b/init
@@ -1,12 +1,52 @@
#!/bin/sh
-pacman -Sy --noconfirm
-pacman -S --noconfirm tmux git
-systemctl start sshd
-echo "root:welcome" | chpasswd
-hostname=$(</etc/hostname)
-ipaddress=$(ip addr show wlan0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
+# init
+# Craig Jennings <c@cjennings.net>
+# An archsetup script to welcome user, present options, and setup ssh
+# server from the live cd. Functions to installing base arch and setup
+# the workstation occur in other scripts, called by this script.
+# Run as root after booting the live cd and issuing the following command:
+# curl -s https://cjennings.net/archsetup/init | sh
-echo ""; echo ""; echo "init complete. "
-echo "you may ssh root@$hostname or ssh root@$ipaddress using the password 'welcome'"
+
+
+welcome () {
+ clear
+ echo "ArchSetup"
+ echo "---------"
+ echo ""
+ echo ""
+}
+
+setup_ssh () {
+ systemctl start sshd
+
+ echo "root:welcome" | chpasswd
+ hostname=$(</etc/hostname)
+ ipaddress=$(ip addr show wlan0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
+
+ echo ""; echo ""; echo "init complete. "
+ echo "you may ssh root@$hostname or ssh root@$ipaddress using the password 'welcome'"
+}
+
+############ SCRIPT
+
+echo "Choose:"
+echo " (1) install the arch linux base system"
+echo " (2) setup the base system as a workstation"
+echo " (3) allow ssh to this live iso"
+echo " (Enter 1, 2, or 3) :"
+read setup
+
+if [ "$setup" = "arch" ]; then
+ # run the arch setup script
+ echo
+
+elif [ "$setup" = "ssh" ]; then
+ setup_ssh #function above
+elif [ "$setup" = "ssh" ]; then
+else
+ echo "Error: Unknown setup option. Please enter 'arch' or 'ssh'."
+ exit 1
+fi