diff options
Diffstat (limited to 'scripts/inital-setup.csh')
-rw-r--r-- | scripts/inital-setup.csh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/inital-setup.csh b/scripts/inital-setup.csh new file mode 100644 index 0000000..07a4ab7 --- /dev/null +++ b/scripts/inital-setup.csh @@ -0,0 +1,19 @@ +# firstboot.csh + +set FIRSTBOOT_EXEC = /usr/sbin/firstboot +set FIRSTBOOT_CONF = /etc/sysconfig/firstboot + +# check if we should run firstboot +grep -i "RUN_FIRSTBOOT=NO" $FIRSTBOOT_CONF >/dev/null +if (( $? != 0 ) && ( -x $FIRSTBOOT_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 + + $FIRSTBOOT_EXEC $args + endif +endif |