summaryrefslogtreecommitdiffstats
path: root/scripts/inital-setup.csh
blob: 85f7534478ada25f05db097a4cff86932d796b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# inital-setup.csh

set IS_EXEC = /usr/sbin/inital-setup
set IS_CONF = /etc/sysconfig/inital-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