head	1.18;
access;
symbols
	caudium_1_4_9:1.18
	caudium_1_4_8:1.18
	caudium_1_4_7:1.18
	caudium_1_4_6:1.18
	caudium_1_2_35:1.15.2.2
	caudium_1_2_34:1.15.2.2
	caudium_1_4_5:1.18
	caudium_1_4_4:1.18
	caudium_1_4_3:1.18
	caudium_1_4_2:1.18
	caudium_1_5_1:1.18
	caudium_1_4_1:1.18
	stable_1_4:1.18.0.2
	caudium_1_3_33:1.18
	caudium_1_3_32:1.18
	caudium_1_3_31:1.18
	caudium_1_3_30:1.18
	caudium_1_3_29:1.18
	caudium_1_2_33:1.15.2.2
	caudium_1_2_32:1.15.2.2
	caudium_1_3_23:1.17
	caudium_1_3_22:1.17
	caudium_1_3_21:1.17
	caudium_1_3_20:1.17
	caudium_1_3_19:1.17
	caudium_1_3_18:1.17
	caudium_1_2_31:1.15.2.1
	caudium_1_2_30:1.15.2.1
	caudium_1_2_29:1.15.2.1
	caudium_1_2_28:1.15.2.1
	caudium_1_3_17:1.17
	caudium_1_3_16:1.17
	caudium_1_2_27:1.15.2.1
	caudium_1_2_26:1.15.2.1
	caudium_1_2_25:1.15.2.1
	caudium_1_2_24:1.15.2.1
	caudium_1_0_57:1.8.2.2
	caudium_1_0_56:1.8.2.2
	caudium_1_3_15:1.16
	caudium_1_3_14:1.16
	caudium_1_2_23:1.15.2.1
	caudium_1_2_22:1.15.2.1
	caudium_1_2_21:1.15.2.1
	caudium_1_2_20:1.15.2.1
	caudium_1_0_55:1.8.2.2
	caudium_1_0_54:1.8.2.2
	caudium_1_3_13:1.16
	caudium_1_3_12:1.16
	caudium_1_3_11:1.16
	caudium_1_3_10:1.16
	caudium_1_2_19:1.15.2.1
	caudium_1_2_18:1.15.2.1
	caudium_1_3_9:1.16
	caudium_1_3_8:1.16
	caudium_1_3_7:1.16
	caudium_1_3_6:1.16
	caudium_1_2_17:1.15.2.1
	caudium_1_2_16:1.15.2.1
	caudium_1_2_15:1.15.2.1
	caudium_1_2_14:1.15.2.1
	caudium_1_2_12:1.15.2.1
	caudium_1_2_10:1.15.2.1
	caudium_1_3_5:1.16
	caudium_1_3_4:1.16
	caudium_1_2_9:1.15.2.1
	caudium_1_2_8:1.15.2.1
	caudium_1_3_3:1.16
	caudium_1_2_7:1.15.2.1
	caudium_1_2_6:1.15.2.1
	caudium_1_0_53:1.8.2.2
	caudium_1_0_52:1.8.2.2
	caudium_1_0_51:1.8.2.2
	caudium_1_0_50:1.8.2.2
	caudium_1_0_45:1.8.2.2
	caudium_1_0_44:1.8.2.2
	caudium_1_0_43:1.8.2.2
	caudium_1_0_42:1.8.2.2
	Caudium_1_3_2:1.16
	caudium_1_2_5:1.15
	caudium_1_2_4:1.15
	caudium_1_0_41:1.8.2.2
	caudium_1_0_40:1.8.2.2
	caudium_1_0_39:1.8.2.2
	Caudium_1_0_38:1.8.2.2
	caudium_1_2_3:1.15
	caudium_1_2_2:1.15
	caudium_1_3_1:1.15
	caudium_1_2_1:1.15
	stable_1_2:1.15.0.2
	caudium_1_0_37:1.8.2.2
	caudium_1_0_36:1.8.2.2
	caudium_1_1_5:1.12
	caudium_1_1_4:1.12
	caudium_1_1_3:1.12
	caudium_1_1_2:1.12
	caudium_1_0_32:1.8.2.2
	caudium_1_0_30:1.8.2.2
	caudium_1_0_28:1.8.2.2
	caudium_1_0_24:1.8.2.2
	caudium_1_0_22:1.8.2.2
	caudium_1_0_20:1.8.2.2
	caudium_1_0_18:1.8.2.2
	caudium_1_0_17:1.8.2.2
	caudium_1_0_16:1.8.2.2
	caudium_1_0_15:1.8.2.1
	caudium_1_0_14:1.8.2.1
	caudium_1_0_13:1.8.2.1
	caudium_1_0_12:1.8.2.1
	caudium_1_0_11:1.8
	caudium_1_0_10:1.8
	stable_1_0:1.8.0.2
	caudium_1_0_9:1.7
	caudium_1_0_8:1.7
	caudium_1_0_7:1.7
	caudium_1_0_6:1.7
	caudium_1_0_5:1.6
	caudium_1_0_4:1.6
	caudium_1_0_3:1.6
	caudium_1_0_2:1.6;
locks; strict;
comment	@# @;


1.18
date	2003.12.02.02.09.28;	author grendel;	state Exp;
branches
	1.18.2.1;
next	1.17;

1.17
date	2003.05.24.22.37.04;	author grendel;	state Exp;
branches;
next	1.16;

1.16
date	2002.04.25.15.45.05;	author grendel;	state Exp;
branches;
next	1.15;

1.15
date	2002.01.09.15.25.32;	author grendel;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	2002.01.09.11.21.30;	author grendel;	state Exp;
branches;
next	1.13;

1.13
date	2002.01.03.17.05.36;	author grendel;	state Exp;
branches;
next	1.12;

1.12
date	2001.06.05.14.26.57;	author grendel;	state Exp;
branches;
next	1.11;

1.11
date	2001.05.28.12.26.40;	author grendel;	state Exp;
branches;
next	1.10;

1.10
date	2000.12.29.21.23.43;	author grendel;	state Exp;
branches;
next	1.9;

1.9
date	2000.12.29.16.01.01;	author grendel;	state Exp;
branches;
next	1.8;

1.8
date	2000.12.08.15.53.40;	author grendel;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2000.11.18.11.11.48;	author grendel;	state Exp;
branches;
next	1.6;

1.6
date	2000.08.26.11.21.22;	author grendel;	state Exp;
branches;
next	1.5;

1.5
date	2000.08.23.14.55.00;	author grendel;	state Exp;
branches;
next	1.4;

1.4
date	2000.08.22.09.46.55;	author grendel;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.21.17.30.02;	author grendel;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.21.17.22.03;	author grendel;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.16.19.30.47;	author grendel;	state Exp;
branches;
next	;

1.8.2.1
date	2000.12.29.15.56.16;	author grendel;	state Exp;
branches;
next	1.8.2.2;

1.8.2.2
date	2001.02.10.16.06.45;	author grendel;	state Exp;
branches;
next	;

1.15.2.1
date	2002.04.25.15.51.18;	author grendel;	state Exp;
branches;
next	1.15.2.2;

1.15.2.2
date	2003.11.20.19.58.03;	author grendel;	state Exp;
branches;
next	;

1.18.2.1
date	2006.10.16.10.06.54;	author grendel;	state Exp;
branches;
next	;


desc
@@


1.18
log
@some more changes
@
text
@#!/bin/sh -e
#
# $Id: config,v 1.15.2.2 2003/11/20 19:58:03 grendel Exp $
#
EXTVER=

. /usr/share/debconf/confmodule

db_version 2.0
db_capb

get_cfg_port() {
    local yesno;
    local port="22202";
    
    db_title 'Config Interface Port'
        
    while test 1; do
     db_input medium caudium${EXTVER}/config_port || true
     db_go
     
     db_get caudium${EXTVER}/config_port || true
     port=$RET
     if test -z "$RET"; then
      db_reset caudium${EXTVER}/config_port || true
      continue
     fi
     
     db_subst caudium${EXTVER}/last_screen cfgport "$port"
     return 0
    done
}

get_iface() {
    local port="80";
    local yesno;
    
    db_title 'Port number'
    db_subst caudium${EXTVER}/listen_on portno $port

    while test 1; do
     db_input medium caudium${EXTVER}/listen_on || true
     db_go
     
     db_get caudium${EXTVER}/listen_on
     port=$RET
     if test -z "$port"; then
        port="`expr $port + 1`"	
     else
        return 0
     fi
     
     db_reset caudium${EXTVER}/listen_on
     db_set caudium${EXTVER}/listen_on $port || true
    done
}

get_cfg_login() {
    local login="${1:-admin}"

    db_title 'Config interface login'
    db_subst caudium${EXTVER}/config_login ciflogin $login

    while test 1; do
        db_input high caudium${EXTVER}/config_login || true
        db_go

        db_get caudium${EXTVER}/config_login
        login="$RET"
        if test -z "$login"; then
            login="admin"
        else
            return 0
        fi

        db_reset caudium${EXTVER}/config_login
        db_set caudium${EXTVER}/config_login $login || true
    done
}

get_cfg_pass() {
    local pass="${1:-password}"
    local pass2="${1:-password}"
    local pass_reset="no"
    local port="22202"
    
    db_title 'Config interface password'
    db_subst caudium${EXTVER}/config_password cifpass $pass

    while test 1; do
        db_input high caudium${EXTVER}/config_password || true
        db_go

        db_get caudium${EXTVER}/config_password
        pass="$RET"
        if test -z "$pass"; then
            pass="password"
	    pass_reset="yes"
        fi
	
        db_input high caudium${EXTVER}/config_password_confirm || true
	db_go
	
	db_get caudium${EXTVER}/config_password_confirm
	pass2="$RET"
	if test -z "$pass2"; then
	    pass2="password"
	    pass_reset="yes"
	fi
	
	if test "$pass" != "$pass2"; then
	  db_input high caudium${EXTVER}/config_password_mismatch || true
	  db_go
	  continue
	fi
	
	if test "$pass_reset" = "yes" -o "$pass" = "password" ; then
	  db_get caudium${EXTVER}/config_port || true
          port=$RET
	  db_subst caudium${EXTVER}/config_password_reset cfgport "$port"
	  db_input high caudium${EXTVER}/config_password_reset || true
	  db_go
	  return 0
	else
	  return 0
	fi
	
        db_reset caudium${EXTVER}/config_password
	db_reset caudium${EXTVER}/config_password_confirm
        db_set caudium${EXTVER}/config_password $pass || true
    done
}

if test ! -f /etc/caudium${EXTVER}/servers/Global_Variables; then
    get_cfg_port
    get_cfg_login
    get_cfg_pass
    get_iface
fi

db_title 'Startup options'
db_input medium caudium${EXTVER}/start_options || true

db_title 'Performance tweaking'
db_input medium caudium${EXTVER}/performance || true

#db_title 'Experimental code'
#db_input low caudium${EXTVER}/experimental_http || true

db_title 'Caudium configuration'
db_input medium caudium${EXTVER}/last_screen || true
    
db_go || true

exit 0
@


1.18.2.1
log
@Preparing for Debian release
@
text
@d3 1
a3 1
# $Id: config,v 1.18 2003/12/02 02:09:28 grendel Exp $
d147 3
@


1.17
log
@updated to the same state as 1.2
@
text
@d3 1
a3 1
# $Id: config,v 1.15.2.1 2002/04/25 15:51:18 grendel Exp $
d83 4
a86 1

d98 1
a98 2
        else
            return 0
d100 28
a127 1

d129 1
@


1.16
log
@debian stuff (not tested yet)
@
text
@d3 1
a3 1
# $Id: config,v 1.15 2002/01/09 15:25:32 grendel Exp $
@


1.15
log
@many debian changes - please update the translations when you have some
time, thanks
@
text
@d3 1
a3 1
# $Id: config,v 1.14 2002/01/09 11:21:30 grendel Exp $
d113 3
@


1.15.2.1
log
@same as for 1.3
@
text
@d3 1
a3 1
# $Id: config,v 1.16 2002/04/25 15:45:05 grendel Exp $
a112 3

db_title 'Performance tweaking'
db_input medium caudium${EXTVER}/performance || true
@


1.15.2.2
log
@quite a few updates for debian
@
text
@d3 1
a3 1
# $Id: config,v 1.15.2.1 2002/04/25 15:51:18 grendel Exp $
d83 1
a83 4
    local pass2="${1:-password}"
    local pass_reset="no"
    local port="22202"
    
d95 2
a96 1
	    pass_reset="yes"
d98 1
a98 28
	
        db_input high caudium${EXTVER}/config_password_confirm || true
	db_go
	
	db_get caudium${EXTVER}/config_password_confirm
	pass2="$RET"
	if test -z "$pass2"; then
	    pass2="password"
	    pass_reset="yes"
	fi
	
	if test "$pass" != "$pass2"; then
	  db_input high caudium${EXTVER}/config_password_mismatch || true
	  db_go
	  continue
	fi
	
	if test "$pass_reset" = "yes" -o "$pass" = "password" ; then
	  db_get caudium${EXTVER}/config_port || true
          port=$RET
	  db_subst caudium${EXTVER}/config_password_reset cfgport "$port"
	  db_input high caudium${EXTVER}/config_password_reset || true
	  db_go
	  return 0
	else
	  return 0
	fi
	
a99 1
	db_reset caudium${EXTVER}/config_password_confirm
@


1.14
log
@stuff for debian
@
text
@d3 1
a3 1
# $Id: config,v 1.13 2002/01/03 17:05:36 grendel Exp $
d58 2
d61 42
d106 2
@


1.13
log
@preparation for the official release
@
text
@d3 1
a3 1
# $Id: config,v 1.12 2001/06/05 14:26:57 grendel Exp $
d14 1
a14 1
    local port="22203";
d23 1
d35 1
a35 1
    local port="81";
@


1.12
log
@New Debian packaging scheme - new package name, new directories, new
config. Also modified some of Makefiles - the install_alt target (used
and meant for package maintainers) now uses one extra variable to put
caudium in "versioned" directories. This is done to enable developers
using Debian machines to run both stable and unstable Caudium
installed from debs (rpms etc.). The changes don't affect anything
else but the Debian config and the install_alt target.
@
text
@d3 1
a3 1
# $Id: config,v 1.11 2001/05/28 12:26:40 grendel Exp $
d5 1
a5 1
EXTVER=-1.1
@


1.11
log
@debian changes
@
text
@d3 1
a3 1
# $Id: config,v 1.10 2000/12/29 21:23:43 grendel Exp $
d5 1
d14 1
a14 1
    local port;
d19 1
a19 1
     db_input medium caudium/config_port || true
d22 1
a22 1
     db_get caudium/config_port || true
d24 1
a24 1
      db_reset caudium/config_port || true
d28 1
a28 1
     db_subst caudium/last_screen cfgport "$port"
d34 1
a34 1
    local port="80";
d38 1
a38 1
    db_subst caudium/listen_on portno $port
d41 1
a41 1
     db_input medium caudium/listen_on || true
d44 1
a44 1
     db_get caudium/listen_on
d52 2
a53 2
     db_reset caudium/listen_on
     db_set caudium/listen_on $port || true
d59 1
a59 1
if test ! -f /etc/caudium/servers/Global_Variables; then
d65 1
a65 1
db_input medium caudium/start_options || true
d68 1
a68 1
#db_input low caudium/experimental_http || true
d71 1
a71 1
db_input medium caudium/last_screen || true
@


1.10
log
@test
@
text
@d3 1
a3 1
# $Id: config,v 1.9 2000/12/29 16:01:01 grendel Exp $
d66 2
a67 2
db_title 'Experimental code'
db_input low caudium/experimental_http || true
@


1.9
log
@fixed a problem with debconf
@
text
@d3 1
a3 1
# $Id: config,v 1.8 2000/12/08 15:53:40 grendel Exp $
d52 1
a52 1
     db_set caudium/listen_on $port
@


1.8
log
@Killed the bug Kiwi found
@
text
@d3 1
a3 1
# $Id: config,v 1.7 2000/11/18 11:11:48 grendel Exp $
d5 1
d8 3
d28 1
a28 1
     return
d48 1
a48 1
        return
d56 1
a56 2
db_version 2.0
db_capb
d73 2
@


1.8.2.1
log
@fixed a problem with debconf
@
text
@d3 1
a3 1
# $Id: config,v 1.8 2000/12/08 15:53:40 grendel Exp $
a5 2
db_version 2.0
db_capb
d24 1
a24 1
     return 0
d44 1
a44 1
        return 0
d52 2
a53 1

a69 2

exit 0@


1.8.2.2
log
@missing newline
@
text
@d3 1
a3 1
# $Id: config,v 1.8.2.1 2000/12/29 15:56:16 grendel Exp $
d72 1
a72 1
exit 0
@


1.7
log
@That should fix the config port testing on Debian (config phase)
@
text
@d3 1
a3 1
# $Id: config,v 1.6 2000/08/26 11:21:22 grendel Exp $
a6 3
PORTCHECK='object port = Stdio.Port(); if (!port->bind((int)getenv("PORTNO"))) write("no"); else write("yes");'
PIKE=/usr/bin/pike7-cvs

d23 2
a24 12
     port="$RET"
     yesno=`env PORTNO=$port $PIKE -e "$PORTCHECK"`
     if test "$yesno" = "no"; then
      db_reset caudium/config_port || true
      db_reset caudium/cfg_port_taken || true
      db_input medium caudium/cfg_port_taken || true
      db_go
      continue
     else
      db_subst caudium/last_screen cfgport "$port"
      break
     fi
a35 5
     yesno=`env PORTNO=$port $PIKE -e "$PORTCHECK"`
     if [ "$yesno" = "yes" ]; then
        break
     fi
     
d43 2
d46 1
@


1.6
log
@keep polishing it up
@
text
@d3 1
a3 1
# $Id: config,v 1.5 2000/08/23 14:55:00 grendel Exp $
d70 1
a70 1
if test ! -f /etc/caudium/Global_Variables; then
@


1.5
log
@- latest version of Debian stuff
- smartlink modified to support sans -rpath and sans -R compiles on Debian
  (it is forbidden by the Debian policy to use these flags)
@
text
@d3 1
a3 1
# $Id: config,v 1.4 2000/08/22 09:46:55 grendel Exp $
d17 1
a17 1
     db_input high caudium/config_port || true
d31 1
a31 1
      db_input high caudium/cfg_port_taken || true
d54 1
a54 1
     db_input high caudium/listen_on || true
@


1.4
log
@further debian changes
@
text
@d3 1
a3 1
# $Id: config,v 1.3 2000/08/21 17:30:02 grendel Exp $
d8 2
a9 2
PIKE=/usr/bin/pike7
set -x
d42 1
a42 1
    local port = "80";
d70 3
a72 2
if test -f /etc/caudium/Global_Variables; then
    exit 0
a74 3
get_cfg_port
get_iface

a75 1
    
d77 3
@


1.3
log
@yep, I blew it again. Now it's OK.
@
text
@d3 1
a3 1
# $Id: config,v 1.1 2000/08/16 19:30:47 grendel Exp $
d9 1
a9 5

init() {
    db_reset caudium/config_port || true
}

d15 1
a15 1
    
d42 1
a42 1
    local port;
d45 3
a47 2
    db_title 'Host address'
    
d49 5
d58 1
a58 1
     port="`echo $RET | cut -s -d ':' -f 2`"
d60 1
a60 13
        port=80
     fi
     
     yesno=`env PORTNO=$port $PIKE -e "$PORTCHECK"`
     if test "$yesno" = "no"; then
      db_reset caudium/listen_on || true
      db_reset caudium/if_port_taken || true
      db_subst caudium/if_port_taken portno $port
      db_input high caudium/if_port_taken || true
      db_go
      continue
     else
      break
d62 2
a68 3
db_subst caudium/listen_on hostname `hostname -f`

init
d70 2
a71 7
if test -f /etc/caudium/servers/localhost; then
    db_title 'Reconfiguration'
    db_input medium caudium/reconfig_localhost || true
    db_go || true
else
    db_set caudium/reconfig_localhost "true"
    RET="true"
d74 2
a75 7
if test "$RET" = "true"; then
    db_reset caudium/config_port
    db_reset caudium/start_options
    db_reset caudium/listen_on
    
    get_cfg_port
    get_iface
d77 1
a77 1
    db_title 'Startup options'
d79 1
a79 1
    db_input medium caudium/start_options || true
d81 2
a82 3
    db_title 'Caudium configuration'
    db_reset caudium/last_screen
    db_input medium caudium/last_screen || true
d84 1
a84 2
    db_go || true
fi
@


1.2
log
@Some more Debian-related changes. It's not perfect yet, but getting close :)
@
text
@a107 20
#!/bin/sh -e
#
# $Id: config,v 1.1 2000/08/16 19:30:47 grendel Exp $
#
. /usr/share/debconf/confmodule

db_version 2.0
db_capb
db_subst caudium/listen_on hostname `hostname -f`

db_title 'Config Interface Port'
db_input medium caudium/config_port || true

db_title 'Host address'
db_input medium caudium/listen_on || true

db_title 'Startup options'
db_input medium caudium/start_options || true

db_go || true
@


1.1
log
@Added Debian GNU/Linux package stuff
@
text
@d3 108
a110 1
# $Id$
@

