summaryrefslogtreecommitdiffstats
path: root/scripts/initial-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/initial-setup.sh')
-rw-r--r--scripts/initial-setup.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/initial-setup.sh b/scripts/initial-setup.sh
new file mode 100644
index 0000000..511e70c
--- /dev/null
+++ b/scripts/initial-setup.sh
@@ -0,0 +1,21 @@
+# firstboot.sh
+
+IS_EXEC=/usr/sbin/initial-setup
+IS_CONF=/etc/sysconfig/initial-setup
+
+# source the config file
+[ -f $IS_CONF ] && . $IS_CONF
+
+# check if we should run firstboot
+if [ -f $IS_EXEC ] && [ "${RUN_INITAL_SETUP,,}" = "yes" ]; then
+ # check if we're not on 3270 terminal and root
+ if [ $(/sbin/consoletype) = "pty" ] && [ $EUID -eq 0 ]; then
+ args=""
+ if grep -i "reconfig" /proc/cmdline >/dev/null || [ -f /etc/reconfigSys ]; then
+ args="--reconfig"
+ fi
+
+ . /etc/sysconfig/i18n
+ $IS_EXEC $args
+ fi
+fi