#!/bin/sh
#----------------------------------------------------------------------------
# /var/install/config.d/ssh-update.sh - ssh parameter update script
#
# Creation:     2003-03-07  ap
# Last Update:  $Id: ssh-update.sh 36643 2015-01-19 13:21:38Z jed $
#
# Copyright (c) 2003-2015 the eisfair team, team(at)eisfair(dot)org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------

package_name="ssh"

# include eislib etc.
. /var/install/include/configlib
. /var/install/include/eislib

# ---------------------------------------------------------------------------
# Set the default values for configuration
# ---------------------------------------------------------------------------

START_SSH='no'

SSH_DAEMON_MAN_CONFIG='no'
SSH_DAEMON_START_METHOD='st'
SSH_PORT='22'

SSH_SERVER_CIPHERS='default'
SSH_SERVER_KEXS='default'
SSH_SERVER_MACS='default'

SSH_LISTEN_ADDR_N='0'
SSH_LISTEN_ADDR_1_NAME=''
SSH_LISTEN_ADDR_1_ACTIVE='no'
SSH_LISTEN_ADDR_1='1'

SSH_ALLOW_USER_N='0'
SSH_ALLOW_USER_1_NAME=''
SSH_ALLOW_USER_1_ACTIVE='no'
SSH_ALLOW_USER_1='root'

SSH_DENY_USER_N='0'
SSH_DENY_USER_1_NAME=''
SSH_DENY_USER_1_ACTIVE='no'
SSH_DENY_USER_1='batch'

SSH_ALLOW_GROUP_N='0'
SSH_ALLOW_GROUP_1_NAME=''
SSH_ALLOW_GROUP_1_ACTIVE='no'
SSH_ALLOW_GROUP_1='root'

SSH_DENY_GROUP_N='0'
SSH_DENY_GROUP_1_NAME=''
SSH_DENY_GROUP_1_ACTIVE='no'
SSH_DENY_GROUP_1='batch'

SSH_PERMITROOTLOGIN='yes'

SSH_PUBLIC_KEY_N='0'
SSH_PUBLIC_KEY_1_NAME=''
SSH_PUBLIC_KEY_1_ACTIVE='no'
SSH_PUBLIC_KEY_1=''

SSH_MAX_STARTUPS='10'
SSH_ENABLE_PRIV_SEPARATION='no'
SSH_COMPRESSION='yes'
SSH_STRICTMODES='yes'
SSH_PASSWDAUTH='yes'
SSH_CH_RESPONSEAUTH='yes'
SSH_CLIENTALIVEINTERVAL='0'
SSH_CLIENTALIVECOUNTMAX='3'

SSH_ENABLE_SFTP='yes'

SSH_LOGLEVEL='INFO'

# ---------------------------------------------------------------------------
# rename old variables
# ---------------------------------------------------------------------------
rename_old_variables ()
{
    # read old values
    if [ -f /etc/config.d/${package_name} ]
    then
        /var/install/bin/backup-file --quiet ${package_name}
        . /etc/config.d/${package_name}
    fi

    # 2015-01-12 update v2.3.8 - support for SSH protocol 1 has been dropped
    if [ "${SSH_USE_SSH1}" = "yes" ]
    then
        mecho --warn "SSH_USE_SSH1='yes' had been set in your current configuration which is not"
        mecho --warn "supported anymore, because support for SSH protocol 1 has been removed to"
        mecho --warn "increase overall system security."
    fi
}


# ---------------------------------------------------------------------------
# Write config and default files
# ---------------------------------------------------------------------------
make_config_file ()
{
    internal_conf_file="$1"
    {
    # -----------------------------------------------------------------------
    printgpl --conf "${package_name}" "2012-09-15" "hbfl"
    # -----------------------------------------------------------------------

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (general settings)"
    # -----------------------------------------------------------------------


    printvar "START_SSH"
    printcomment            "start ssh 'yes' or 'no'"

    if [ -n "${SSHD_MAN_CONFIG}" ]
    then
        SSH_DAEMON_MAN_CONFIG=${SSHD_MAN_CONFIG}
        SSH_DAEMON_START_METHOD=${SSHD_START_METHOD}
        old_ssh=true
    fi

    printvar "SSH_DAEMON_MAN_CONFIG"
    printcomment            "SSH DAEMON manual configuration 'yes' or"
    printcomment            "'no'. If set to 'yes'"
    printcomment            "file /etc/ssh/sshd_config will"
    printcomment            "not be generated automatically. It is your"
    printcomment            "responsibility to create a valid configuration"
    printcomment            "file /etc/ssh/sshd_config."
    printvar "SSH_DAEMON_START_METHOD"
    printcomment            "Start method for sshd."
    printcomment            "'st' start sshd as standalone server."
    printcomment            "'xi' start sshd via xinetd."
    printcomment            "'xi' requires START_XINETD='yes'."
    printvar "SSH_PORT"
    printcomment            "ssh port, see also FIREWALL_DENY_PORT_x"

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (protocol settings)"
    # -----------------------------------------------------------------------

    printvar "SSH_SERVER_CIPHERS"
    printcomment            "allowed ciphers"
    printvar "SSH_SERVER_KEXS"
    printcomment             "allowed (Key Exchange) algorithms"
    printvar "SSH_SERVER_MACS"
    printcomment             "allowed MAC (message authentication code)algorithms"

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (listen address settings)"
    # -----------------------------------------------------------------------

    printvar "SSH_LISTEN_ADDR_N"
    printcomment            "Number of addresses sshd should listen to"
    printcomment            "0 - listen on all local addresses"

    if [ ${SSH_LISTEN_ADDR_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_LISTEN_ADDR_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_LISTEN_ADDR_N} -eq 0 ]
            then
                eval SSH_LISTEN_ADDR_${idx}_ACTIVE='no'
            else
                eval SSH_LISTEN_ADDR_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_LISTEN_ADDR_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_LISTEN_ADDR_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_LISTEN_ADDR_${idx}"
        printcomment        "First ip address, sshd should listen to"
        printcomment        "use n'th ethernet card configured in"
        printcomment        "/etc/config.d/base."
        printcomment        "E.g. SSH_LISTEN_ADDR_1='2' points to"
        printcomment        "IP_ETH_2_IPADDR in /etc/config.d/base."
        echo
        idx=$(expr ${idx} + 1)
    done

    # -----------------------------------------------------------------------
    printcustomgroup "SSH - secure shell (allow/deny settings)" << !EOC
    #
    # Please use this settings with care.
    # All four lists are checked when a login is
    # done. So wrong settings could exclude an
    # important user (e.g. root or eis) from login.
!EOC
    # -----------------------------------------------------------------------

    printvar "SSH_ALLOW_USER_N"
    printcomment            "Number of user name patterns."
    printcomment            "Login is allowed only for user names"
    printcomment            "that match one of the pattern. '*' and"
    printcomment            "'?' can be used as wildcards in the"
    printcomment            "patterns."
    printcomment            "Default: 0 - login is allowed for all users."

    if [ ${SSH_ALLOW_USER_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_ALLOW_USER_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_ALLOW_USER_N} -eq 0 ]
            then
                eval SSH_ALLOW_USER_${idx}_ACTIVE='no'
            else
                eval SSH_ALLOW_USER_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_ALLOW_USER_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_ALLOW_USER_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_ALLOW_USER_${idx}"
        printcomment        "First user name pattern."
    echo
        idx=$(expr ${idx} + 1)
    done


    printvar "SSH_DENY_USER_N"
    printcomment            "Number of user name patterns."
    printcomment            "Login is disallowed only for user names"
    printcomment            "that match one of the pattern. '*' and"
    printcomment            "'?' can be used as wildcards in the"
    printcomment            "patterns."
    printcomment            "Default: 0 - login is allowed for all users."

    if [ ${SSH_DENY_USER_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_DENY_USER_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_DENY_USER_N} -eq 0 ]
            then
                eval SSH_DENY_USER_${idx}_ACTIVE='no'
            else
                eval SSH_DENY_USER_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_DENY_USER_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_DENY_USER_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_DENY_USER_${idx}"
        printcomment        "First user name pattern."
        echo
        idx=$(expr ${idx} + 1)
    done

    printvar "SSH_ALLOW_GROUP_N"
    printcomment            "Number of group name patterns."
    printcomment            "Login is allowed only for users whose"
    printcomment            "primary group or supplementary group"
    printcomment            "matches one of the pattern. '*' and '?' can"
    printcomment            "be used as wildcards in the patterns."
    printcomment            "Default: 0 - login is allowed for all groups."

    if [ ${SSH_ALLOW_GROUP_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_ALLOW_GROUP_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_ALLOW_GROUP_N} -eq 0 ]
            then
                eval SSH_ALLOW_GROUP_${idx}_ACTIVE='no'
            else
                eval SSH_ALLOW_GROUP_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_ALLOW_GROUP_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_ALLOW_GROUP_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_ALLOW_GROUP_${idx}"
        printcomment        "First group name pattern."
        echo
        idx=$(expr ${idx} + 1)
    done

    printvar "SSH_DENY_GROUP_N"
    printcomment            "Number of group name patterns."
    printcomment            "Login is disallowed only for users whose"
    printcomment            "primary group or supplementary group"
    printcomment            "matches one of the pattern. '*' and '?' can"
    printcomment            "be used as wildcards in the patterns."
    printcomment            "Default: 0 - login is allowed for all groups."

    if [ ${SSH_DENY_GROUP_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_DENY_GROUP_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_DENY_GROUP_N} -eq 0 ]
            then
                eval SSH_DENY_GROUP_${idx}_ACTIVE='no'
            else
                eval SSH_DENY_GROUP_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_DENY_GROUP_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_DENY_GROUP_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_DENY_GROUP_${idx}"
        printcomment        "First group name pattern."
        echo
        idx=$(expr ${idx} + 1)
    done

    printvar "SSH_PERMITROOTLOGIN"
    printcomment            "Secifies whether root can login using ssh."
    printcomment            "'yes' User root can login."
    printcomment            "'no' User root can't login."
    printcomment            "'without-password' Password authentication"
    printcomment            "for user root is disabled. Note that other"
    printcomment            "authentications (e.g. keyboard-interactive/"
    printcomment            "PAM) may still allow root to login using a"
    printcomment            "password."
    printcomment            "'forced-commands-only' root login with"
    printcomment            "public key authentication will be allowed,"
    printcomment            "but only if the command option has been"
    printcomment            "specified."

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (public key settings for user root)"
    # -----------------------------------------------------------------------

    printvar "SSH_PUBLIC_KEY_N"
    printcomment            "number of public keys or keyfile to add"
    printcomment            "to /root/.ssh/authorized_keys"

    if [ ${SSH_PUBLIC_KEY_N} -eq 0 ]
    then
        count=1
    else
        count=${SSH_PUBLIC_KEY_N}
    fi

    idx=1
    while [ "${idx}" -le "${count}" ]
    do
        if ${old_ssh:-false}
        then
            if [ ${SSH_PUBLIC_KEY_N} -eq 0 ]
            then
                eval SSH_PUBLIC_KEY_${idx}_ACTIVE='no'
            else
                eval SSH_PUBLIC_KEY_${idx}_ACTIVE='yes'
            fi
        fi

        printvar "SSH_PUBLIC_KEY_${idx}_NAME"
        printcomment        "Use a name, its only for you"
        printvar "SSH_PUBLIC_KEY_${idx}_ACTIVE"
        printcomment        "Use: yes or no"
        printvar "SSH_PUBLIC_KEY_${idx}"
        printcomment        "public key (identity.pub) generated"
        printcomment        "by ssh-keygen"
        printcomment        "If the first character is a slash (/)"
        printcomment        "the value is interpreted as an absolut"
        printcomment        "pathname of a file. The content of this"
        printcomment        "file is added to the file"
        printcomment        "/root/.ssh/authorized_keys"
        echo
        idx=$(expr ${idx} + 1)
    done

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (additional settings)"
    # -----------------------------------------------------------------------

    printvar "SSH_MAX_STARTUPS"
    printcomment            "maximum number of concurrent unauthenticated"
    printcomment            "connections. default: 10"
    printvar "SSH_ENABLE_PRIV_SEPARATION"
    printcomment            "enable privilege separation: 'yes' or 'no'"
    printvar "SSH_COMPRESSION"
    printcomment            "allow compression: 'yes' or 'no'"
    printvar "SSH_STRICTMODES"
    printcomment            "Use Strictmodes: 'yes' or 'no'"
    printvar "SSH_PASSWDAUTH"
    printcomment            "Allow password authentication 'yes'"
    printcomment            "or 'no'. If password authentication"
    printcomment            "is not allowed you have to use key"
    printcomment            "authentication. Check that key"
    printcomment            "authentication works fine before you"
    printcomment            "set SSH_PASSWDAUTH to 'no'."
    printvar "SSH_CH_RESPONSEAUTH"
    printcomment            "Allow challenge response authentication"
    printcomment            "'yes' or 'no'."
    printvar "SSH_CLIENTALIVEINTERVAL"
    printcomment            "Timeout interval in seconds for"
    printcomment            "client alive message."
    printcomment            "Default: 0 - no message"
    printvar "SSH_CLIENTALIVECOUNTMAX"
    printcomment            "Number of client alive messages"
    printcomment            "until disconnection."
    printcomment            "Default: 3"

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (subsystem settings)"
    # -----------------------------------------------------------------------

    printvar "SSH_ENABLE_SFTP"
    printcomment            "activate sftp: 'yes' or 'no'"

    # -----------------------------------------------------------------------
    printgroup "SSH - secure shell (log level settings)"
    # -----------------------------------------------------------------------

    printvar "SSH_LOGLEVEL"
    printcomment            "Verbosity level that is used when"
    printcomment            "logging messages from sshd."
    printcomment            "Values QUIET FATAL ERROR INFO VERBOSE"
    printcomment            "DEBUG DEBUG1 DEBUG2 DEBUG3 are allowed."
    printcomment            "Default: INFO"
    printcomment            "Logging with a DEBUG level violates"
    printcomment            "the privacy of users and is not"
    printcomment            "recommended."

    # -----------------------------------------------------------------------
    printend
    # -----------------------------------------------------------------------
    } >  $internal_conf_file
    # Set rights
    chmod 0600 $internal_conf_file
    chown root $internal_conf_file
}

# ---------------------------------------------------------------------------
# Create the check.d file
# ---------------------------------------------------------------------------
make_check_file()
{
printgpl --check ${package_name} "2011-04-10" "ap"  >/etc/check.d/${package_name}
cat >>/etc/check.d/${package_name} <<EOF
# Variable                  OPT_VARIABLE               VARIABLE_N         VALUE
START_SSH                   -                          -                  YESNO
SSH_DAEMON_MAN_CONFIG       START_SSH                  -                  YESNO
SSH_DAEMON_START_METHOD     START_SSH                  -                  SSH_STARTMODE
SSH_PORT                    START_SSH                  -                  SSH_PORT
SSH_SERVER_CIPHERS          START_SSH                  -                  SSH_CIPHERS_ALGOS
SSH_SERVER_KEXS             START_SSH                  -                  SSH_CIPHERS_ALGOS
SSH_SERVER_MACS             START_SSH                  -                  SSH_CIPHERS_ALGOS
SSH_LISTEN_ADDR_N           START_SSH                  -                  SSH_LISTEN_ADDR_N
SSH_LISTEN_ADDR_%_NAME      START_SSH                  SSH_LISTEN_ADDR_N  NONE
SSH_LISTEN_ADDR_%_ACTIVE    START_SSH                  SSH_LISTEN_ADDR_N  YESNO
SSH_LISTEN_ADDR_%           SSH_LISTEN_ADDR_%_ACTIVE   SSH_LISTEN_ADDR_N  SSH_LISTEN_ADDR
SSH_ALLOW_USER_N            START_SSH                  -                  NUMERIC
SSH_ALLOW_USER_%_NAME       START_SSH                  SSH_ALLOW_USER_N   NONE
SSH_ALLOW_USER_%_ACTIVE     START_SSH                  SSH_ALLOW_USER_N   YESNO
SSH_ALLOW_USER_%            SSH_ALLOW_USER_%_ACTIVE    SSH_ALLOW_USER_N   SSH_USER
SSH_DENY_USER_N             START_SSH                  -                  NUMERIC
SSH_DENY_USER_%_NAME        START_SSH                  SSH_DENY_USER_N    NONE
SSH_DENY_USER_%_ACTIVE      START_SSH                  SSH_DENY_USER_N    YESNO
SSH_DENY_USER_%             SSH_DENY_USER_%_ACTIVE     SSH_DENY_USER_N    SSH_USER
SSH_ALLOW_GROUP_N           START_SSH                  -                  NUMERIC
SSH_ALLOW_GROUP_%_NAME      START_SSH                  SSH_ALLOW_GROUP_N  NONE
SSH_ALLOW_GROUP_%_ACTIVE    START_SSH                  SSH_ALLOW_GROUP_N  YESNO
SSH_ALLOW_GROUP_%           SSH_ALLOW_GROUP_%_ACTIVE   SSH_ALLOW_GROUP_N  SSH_GROUP
SSH_DENY_GROUP_N            START_SSH                  -                  NUMERIC
SSH_DENY_GROUP_%_NAME       START_SSH                  SSH_DENY_GROUP_N   NONE
SSH_DENY_GROUP_%_ACTIVE     START_SSH                  SSH_DENY_GROUP_N   YESNO
SSH_DENY_GROUP_%            SSH_DENY_GROUP_%_ACTIVE    SSH_DENY_GROUP_N   SSH_GROUP
SSH_PERMITROOTLOGIN         START_SSH                  -                  SSH_PERMITROOTLOGIN
SSH_PUBLIC_KEY_N            START_SSH                  -                  NUMERIC
SSH_PUBLIC_KEY_%_NAME       START_SSH                  SSH_PUBLIC_KEY_N   NONE
SSH_PUBLIC_KEY_%_ACTIVE     START_SSH                  SSH_PUBLIC_KEY_N   YESNO
SSH_PUBLIC_KEY_%            SSH_PUBLIC_KEY_%_ACTIVE    SSH_PUBLIC_KEY_N   NONE
SSH_MAX_STARTUPS            START_SSH                  -                  NUMERIC
SSH_ENABLE_PRIV_SEPARATION  START_SSH                  -                  YESNO
SSH_COMPRESSION             START_SSH                  -                  YESNO
SSH_STRICTMODES             START_SSH                  -                  YESNO
SSH_PASSWDAUTH              START_SSH                  -                  YESNO
SSH_CH_RESPONSEAUTH         START_SSH                  -                  YESNO
SSH_CLIENTALIVEINTERVAL     START_SSH                  -                  NUMERIC
SSH_CLIENTALIVECOUNTMAX     START_SSH                  -                  NUMERIC
SSH_ENABLE_SFTP             START_SSH                  -                  YESNO
SSH_LOGLEVEL                START_SSH                  -                  SSH_LOGLEVEL
EOF

   # Set rights for check.d file
   chmod 0600 /etc/check.d/${package_name}
   chown root /etc/check.d/${package_name}



printgpl --check_exp ${package_name} "2011-04-10" "ap"  >/etc/check.d/${package_name}.exp
cat >>/etc/check.d/${package_name}.exp <<EOF
SSH_STARTMODE       = 'st|xi'
                    : 'only st(standalone) or xi(xinetd) are allowed'
SSH_PORT            = '[0-9]{0,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]'
                    : 'port must be in range 1..65535'
SSH_UMASK           = '[0-7]{3}'
                    : 'umask must be octal 000 to octal 777'
SSH_UMASKS          = '()|(RE:SSH_UMASK):(RE:SSH_UMASK)'
                    : 'umasks format is <umask for files>:<umask for dirs> where umask is octal 000 to octal 777'
SSH_GID             = '()|[0-9]{0,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]'
                    : 'group must be in range 1..65535'
SSH_PERCENTAGE      = '()|[1-9][0-9]|[1-9]'
                    : 'value must be in range 1..99'
SSH_NUMERIC_E       = '()|(RE:NUMERIC)'
                    : 'value must be numeric or empty'
SSH_LOGLEVEL        = 'QUIET|FATAL|ERROR|INFO|VERBOSE|DEBUG|DEBUG1|DEBUG2|DEBUG3'
                    : 'wrong Loglevel, see documentation'
SSH_PERMITROOTLOGIN = 'yes|no|without-password|forced-commands-only'
                    : 'wrong value for SSH_PERMITROOTLOGIN, see documentation'
SSH_GROUP           = '(RE:NOBLANK)'
                    : 'value must be a valid username or pattern'
SSH_USER            = '(RE:NOBLANK)'
                    : 'value must be a valid group or pattern'
SSH_LISTEN_ADDR_N   = '(RE:NUMERIC)'
                    : 'value must be numeric'
SSH_LISTEN_ADDR     = '(RE:NUMERIC)'
                    : 'value must be numeric'
SSH_IPADDR          = '()|(RE:IPADDR)'
                    : 'no valid ip address'
SSH_NBIPADDR        = '(RE:IPADDR)'
                    : 'no valid ip address'
SSH_CIPHERS_ALGOS   = 'all|default|([a-zA-Z0-9][a-zA-Z0-9@.-]+)(,([a-zA-Z0-9][a-zA-Z0-9@.-]+))*'
                    : "value must be 'default', a valid cipher or algorythm, or 'all'."
EOF

    # Set rights for check.exp file
    chmod 0600 /etc/check.d/${package_name}.exp
    chown root /etc/check.d/${package_name}.exp
}

# ---------------------------------------------------------------------------
# main
# ---------------------------------------------------------------------------
# write default config file
make_config_file /etc/default.d/${package_name}

# update from old version
rename_old_variables

# write new config file
make_config_file /etc/config.d/${package_name}

# write check.d file
make_check_file

exit 0
# ---------------------------------------------------------------------------
# end
#----------------------------------------------------------------------------
