summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xroot_scripts/boot_config.sh7
-rwxr-xr-xuser_scripts/applications.sh8
2 files changed, 14 insertions, 1 deletions
diff --git a/root_scripts/boot_config.sh b/root_scripts/boot_config.sh
index a0df083..4347ae8 100755
--- a/root_scripts/boot_config.sh
+++ b/root_scripts/boot_config.sh
@@ -2,6 +2,13 @@
# Craig Jennings <c@cjennings.net>
# speeds and tidies the boot sequence
+# ensure root
+if ! [ $(id -u) -eq 0 ]
+then
+ echo "Must run as root. Exiting."
+ exit
+fi
+
# disable devil icon in boot menu
sysrc -f /boot/loader.conf loader_logo="none"
diff --git a/user_scripts/applications.sh b/user_scripts/applications.sh
index 48d1cf0..a73ea1e 100755
--- a/user_scripts/applications.sh
+++ b/user_scripts/applications.sh
@@ -1,7 +1,13 @@
#!/bin/sh
# Craig Jennings <c@cjennings.net>
# installs commonly used applications
-# note sudo must be configured
+
+# ensure user
+if [ $(id -u) -eq 0 ]
+then
+ echo "Must run as user. Exiting."
+ exit
+fi
#### Emacs and Dependencies
sudo pkg install -y emacs # everything is ultimately to run or assist Emacs