summaryrefslogtreecommitdiffstats
path: root/scripts/initial-setup.csh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/initial-setup.csh')
-rw-r--r--scripts/initial-setup.csh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/initial-setup.csh b/scripts/initial-setup.csh
new file mode 100644
index 0000000..8ea1975
--- /dev/null
+++ b/scripts/initial-setup.csh
@@ -0,0 +1,19 @@
+# initial-setup.csh
+
+set IS_EXEC = /usr/sbin/initial-setup
+set IS_CONF = /etc/sysconfig/initial-setup
+
+# check if we should run firstboot
+grep -i "RUN_INITAL_SETUP=NO" $IS_CONF >/dev/null
+if (( $? != 0 ) && ( -x $IS_EXEC )) then
+ # check if we're not on 3270 terminal and root
+ if (( `/sbin/consoletype` == "pty" ) && ( `/usr/bin/id -u` == 0 )) then
+ set args = ""
+ grep -i "reconfig" /proc/cmdline >/dev/null
+ if (( $? == 0 ) || ( -e /etc/reconfigSys )) then
+ set args = "--reconfig"
+ endif
+
+ $IS_EXEC $args
+ endif
+endif