1998-11-18
1998-11-18 04:54:36 by Per Hedbor <ph@opera.com>
-
b796b53d70c975120f24ab10f791650b46893bbb
(489 lines)
(+382/-107)
[
Show
| Annotate
]
Branch: 5.2
Better locale support, moved parse_rxml to the configuration object, started workd on the new configuration interface
Rev: server/base_server/cache.pike:1.22
Rev: server/base_server/config/describers.pike:1.58
Rev: server/base_server/config/low_describers.pike:1.28
Rev: server/base_server/configlocale.pike:1.1
Rev: server/base_server/configuration.pike:1.167
Rev: server/base_server/fonts.pike:1.25
Rev: server/base_server/mainconfig.pike:1.116
Rev: server/base_server/module.pike:1.36
Rev: server/base_server/module_support.pike:1.19
Rev: server/base_server/roxen.pike:1.252
Rev: server/base_server/roxenlib.pike:1.89
Rev: server/base_server/roxenloader.pike:1.80
Rev: server/base_server/rxml.pike:1.1
Rev: server/base_server/wizard.pike:1.77
Rev: server/config_actions/cachestatus.pike:1.4
Rev: server/config_actions/debuginformation.pike:1.16
Rev: server/config_actions/feature_list.pike:1.4
Rev: server/config_actions/flush.pike:1.7
Rev: server/config_actions/listfonts.pike:1.4
Rev: server/config_actions/problems.pike:1.12
Rev: server/config_actions/reloadconfiginterface.pike:1.9
Rev: server/etc/include/roxen.h:1.8
Rev: server/etc/roxen_master.pike:1.49
Rev: server/modules/directories/indexfiles.pike:1.7
Rev: server/modules/filters/auto_gzip.pike:1.5
Rev: server/modules/graphics/business_graphics/business.pike:1.110
Rev: server/modules/graphics/counter.pike:1.22
Rev: server/modules/graphics/graphic_text.pike:1.156
Rev: server/modules/graphics/pimage.pike:1.12
Rev: server/modules/graphics/rimage/rimage.pike:1.8
Rev: server/modules/logging/home_logger.pike:1.19
Rev: server/modules/misc/gtext_creator.pike:1.1
Rev: server/modules/misc/language.pike:1.17
Rev: server/modules/misc/mirrorserver.pike:1.14
Rev: server/modules/proxies/ftpgateway.pike:1.26
Rev: server/modules/proxies/gopher.pike:1.15
Rev: server/modules/proxies/wais.pike:1.12
Rev: server/modules/scripting/cgi.pike:1.106
Rev: server/modules/scripting/pikescript.pike:1.30
Rev: server/modules/tags/doc/graphic_text:1.5
Rev: server/modules/tags/htmlparse.pike:1.153
Rev: server/modules/tags/lpctag.pike:1.19
Rev: server/modules/tags/wizard_tag.pike:1.18
Rev: server/protocols/ftp.pike:1.97
Rev: server/protocols/http.pike:1.121
Rev: server/start:1.54
1:
/*
- * $Id: roxen.pike,v 1.251 1998/11/13 17:12:26 marcus Exp $
+ * $Id: roxen.pike,v 1.252 1998/11/18 04:53:50 per Exp $
*
* The Roxen Challenger main program.
*
8:
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.251 1998/11/13 17:12:26 marcus Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.252 1998/11/18 04:53:50 per Exp $";
// Some headerfiles
57:
// pids of the start-script and ourselves.
int startpid, roxenpid;
+ class container
+ {
+ mixed value;
+ mixed set(mixed to)
+ {
+ return value=to;
+ }
+ mixed get()
+ {
+ return value;
+ }
+ }
+
// Locale support
- object(Locale.Roxen.standard) default_locale = Locale.Roxen.svenska; // standard;
+ object(Locale.Roxen.standard) default_locale=Locale.Roxen.standard;
object fonts;
#ifdef THREADS
object locale = thread_local();
#else
- object(Locale.Roxen.standard) locale = default_locale;
+ object(Locale.Roxen.standard) locale = container();
#endif /* THREADS */
#define LOCALE LOW_LOCALE->base_server
203:
}
}
- call_out(really_low_shutdown, 5, exit_code);
+ call_out(really_low_shutdown, 2, exit_code);
}
// Perhaps somewhat misnamed, really... This function will close all
323:
array (mixed) h, q;
while(1)
{
- SET_LOCALE(default_locale);
+
if(q=catch {
do {
if((h=handle_queue->read()) && h[0]) {
-
+ SET_LOCALE(default_locale);
h[0](@h[1]);
h=0;
} else if(!h) {
1097:
void create()
{
- SET_LOCALE(default_locale);
+ // SET_LOCALE(default_locale);
catch
{
1448:
{
int p;
- // FIXME: LOCALE!
-
+
globvar("set_cookie", 0, "Set unique user id cookies", TYPE_FLAG,
- "If set to Yes, all users of your server whose clients support "
- "cookies will get a unique 'user-id-cookie', this can then be "
- "used in the log and in scripts to track individual users.");
+ #"If set to Yes, all users of your server whose clients support
+ cookies will get a unique 'user-id-cookie', this can then be
+ used in the log and in scripts to track individual users.");
-
+ deflocaledoc( "svenska", "set_cookie",
+ "Sätt en unik cookie för alla användare",
+ #"Om du sätter den här variabeln till 'ja', så kommer
+ alla användare att få en unik kaka (cookie) med namnet 'RoxenUserID' satt. Den
+ här kakan kan användas i skript för att spåra individuella användare. Det är
+ inte rekommenderat att använda den här variabeln, många användare tycker illa
+ om cookies");
+
globvar("set_cookie_only_once",1,"Set ID cookies only once",TYPE_FLAG,
- "If set to Yes, Roxen will attempt to set unique user ID cookies "
- "only upon receiving the first request (and again after some "
- "minutes). Thus, if the user doesn't allow the cookie to be set, "
- "he won't be bothered with multiple requests.",0,
+ #"If set to Yes, Roxen will attempt to set unique user ID cookies
+ only upon receiving the first request (and again after some minutes). Thus, if
+ the user doesn't allow the cookie to be set, she won't be bothered with
+ multiple requests.",0,
lambda() {return !QUERY(set_cookie);});
-
+ deflocaledoc( "svenska", "set_cookie_only_once",
+ "Sätt bara kakan en gång per användare",
+ #"Om den här variablen är satt till 'ja' så kommer roxen bara
+ försöka sätta den unika användarkakan en gång. Det gör att om användaren inte
+ tillåter att kakan sätts, så slipper hon eller han iallafall nya frågor under
+ några minuter");
+
globvar("show_internals", 1, "Show the internals", TYPE_FLAG,
- "Show 'Internal server error' messages to the user. "
- "This is very useful if you are debugging your own modules "
- "or writing Pike scripts.");
+ #"Show 'Internal server error' messages to the user.
+ This is very useful if you are debugging your own modules
+ or writing Pike scripts.");
-
+ deflocaledoc( "svenska", "show_internals", "Visa interna fel",
+ #"Visa interna server fel för användaren av servern.
+ Det är väldigt användbart när du utvecklar egna moduler eller pikeskript.");
- // Hidden variables (compatibility ones, or internal or too
- // dangerous
- /* globvar("BS", 0, "Configuration interface: Compact layout",*/
- /* TYPE_FLAG|VAR_EXPERT,*/
- /* "Sick and tired of all those images? Set this variable to 'Yes'!");*/
- /* globvar("BG", 1, "Configuration interface: Background",*/
- /* TYPE_FLAG|VAR_EXPERT,*/
- /* "Should the background be set by the configuration interface?");*/
-
- // globvar("_v", CONFIGURATION_FILE_LEVEL, 0, TYPE_INT, 0, 0, 1);
+
globvar("default_font_size", 32, 0, TYPE_INT, 0, 0, 1);
-
-
+
globvar("default_font", "lucida", "Fonts: Default font", TYPE_FONT,
"The default font to use when modules request a font.");
-
+ deflocaledoc( "svenska", "default_font", "Typsnitt: Normaltypsnitt",
+ #"När moduler ber om en typsnitt som inte finns, eller skriver
+ grafisk text utan att ange ett typsnitt, så används det här typsnittet.");
+
globvar("font_dirs", ({"../local/nfonts/", "nfonts/" }),
"Fonts: Font directories", TYPE_DIR_LIST,
"This is where the fonts are located.");
-
+ deflocaledoc( "svenska", "font_dirs", "Typsnitt: Typsnittssökväg",
+ "Sökväg för typsnitt.");
+
+
globvar("logdirprefix", "../logs/", "Log directory prefix",
TYPE_DIR|VAR_MORE,
- "This is the default file path that will be prepended to the log "
- " file path in all the default modules and the virtual server.");
+ #"This is the default file path that will be prepended to the log
+ file path in all the default modules and the virtual server.");
-
+ deflocaledoc( "svenska", "logdirprefix", "Loggningsmappprefix",
+ "Alla nya loggar som skapas får det här prefixet.");
// Cache variables. The actual code recides in the file
// 'disk_cache.pike'
-
+
globvar("cache", 0, "Proxy disk cache: Enabled", TYPE_FLAG,
"If set to Yes, caching will be enabled.");
-
+ deflocaledoc( "svenska", "cache", "Proxydiskcache: På",
+ "Om ja, använd cache i alla proxymoduler som hanterar det.");
globvar("garb_min_garb", 1, "Proxy disk cache: Clean size", TYPE_INT,
"Minimum number of Megabytes removed when a garbage collect is done.",
0, cache_disabled_p);
-
+ deflocaledoc( "svenska", "garb_min_garb",
+ "Proxydiskcache: Minimal rensningsmängd",
+ "Det minsta antalet Mb som tas bort vid en cacherensning.");
-
+
globvar("cache_minimum_left", 5, "Proxy disk cache: Minimum "
"available free space and inodes (in %)", TYPE_INT,
- "If less than this amount of disk space or inodes (in %) is left, "
- "the cache will remove a few files. This check may work "
- "half-hearted if the diskcache is spread over several filesystems.",
+ #"If less than this amount of disk space or inodes (in %) is left,
+ the cache will remove a few files. This check may work
+ half-hearted if the diskcache is spread over several filesystems.",
0,
#if constant(filesystem_stat)
cache_disabled_p
1516:
1
#endif /* filesystem_stat */
);
+ deflocaledoc( "svenska", "cache_minimum_free",
+ "Proxydiskcache: Minimal fri disk",
+ "Om det är mindre plats (i %) ledigt på disken än vad som "
+ "anges i den här variabeln så kommer en cacherensning ske.");
-
+
globvar("cache_size", 25, "Proxy disk cache: Size", TYPE_INT,
"How many MB may the cache grow to before a garbage collect is done?",
0, cache_disabled_p);
-
+ deflocaledoc( "svenska", "cache_size", "Proxydiskcache: Storlek",
+ "Cachens maximala storlek, i Mb.");
globvar("cache_max_num_files", 0, "Proxy disk cache: Maximum number "
"of files", TYPE_INT, "How many cache files (inodes) may "
"be on disk before a garbage collect is done ? May be left "
"zero to disable this check.",
0, cache_disabled_p);
-
+ deflocaledoc( "svenska", "cache_max_num_files",
+ "Proxydiskcache: Maximalt antal filer",
+ "Om det finns fler än så här många filer i cachen "
+ "kommer en cacherensning ske. Sätt den här variabeln till "
+ "noll för att hoppa över det här testet.");
globvar("bytes_per_second", 50, "Proxy disk cache: Bytes per second",
TYPE_INT,
1533:
" Each X bytes counts as a second, so that larger files will"
" be removed first.",
0, cache_disabled_p);
+ deflocaledoc( "svenska", "bytes_per_second",
+ "Proxydiskcache: Bytes per sekund",
+ "Normalt sätt så tas de äldsta filerna bort, men filens "
+ "storlek modifierar dess 'ålder' i cacherensarens ögon. "
+ "Den här variabeln anger hur många bytes som ska motsvara "
+ "en sekund.");
globvar("cachedir", "/tmp/roxen_cache/",
"Proxy disk cache: Base Cache Dir",
1541:
"To avoid mishaps, 'roxen_cache/' is always prepended to this "
"variable.",
0, cache_disabled_p);
+ deflocaledoc("svenska", "cachedir", "Proxydiskcache: Cachedirectory",
+ "Den här variabeln anger vad cachen ska sparas. "
+ "För att undvika fatala misstag så adderas alltid "
+ "'roxen_cache/' till den här variabeln när den sätts om.");
globvar("hash_num_dirs", 500,
"Proxy disk cache: Number of hash directories",
1550:
"cache, since the cache cannot find the old files. In the future, "
" the cache will be recalculated when this value is changed.",
0, cache_disabled_p);
+ deflocaledoc("svenska", "hash_num_dirs",
+ "Proxydiskcache: Antalet cachesubdirectoryn",
+ "Disk cachen lagrar datan i flera directoryn, den här "
+ "variabeln anger i hur många olika directoryn som datan ska "
+ "lagras. Om du ändrar på den här variabeln så blir hela den "
+ "gamla cachen invaliderad.");
globvar("cache_keep_without_content_length", 1, "Proxy disk cache: "
"Keep without Content-Length", TYPE_FLAG, "Keep files "
"without Content-Length header information in the cache?",
0, cache_disabled_p);
-
+ deflocaledoc("svenska", "cache_keep_without_content_length",
+ "Proxydiskcache: Behåll filer utan angiven fillängd",
+ "Spara filer även om de inte har någon fillängd. "
+ "Cachen kan innehålla trasiga filer om den här "
+ "variabeln är satt, men fler filer kan sparas");
globvar("cache_check_last_modified", 0, "Proxy disk cache: "
"Refresh on Last-Modified", TYPE_FLAG,
1563:
"cached. This may be useful for some regularly updated docs as "
"online newspapers.",
0, cache_disabled_p);
+ deflocaledoc("svenska", "cache_check_last_modified",
+ "Proxydiskcache: Kontrollera värdet at Last-Modifed headern",
+ #"Om den här variabeln är satt så kommer även filer utan Expire header att tas
+ bort ur cachen när de blir dubbelt så gamla som de var när de hämtades från
+ källservern om de har en last-modified header som anger när de senast
+ ändrades");
globvar("cache_last_resort", 0, "Proxy disk cache: "
"Last resort (in days)", TYPE_INT,
"How many days shall files without Expires and without "
"Last-Modified header information be kept?",
0, cache_disabled_p);
-
+ deflocaledoc("svenska", "cache_last_resort",
+ "Proxydiskcache: Spara filer utan datum",
+ "Hur många dagar ska en fil utan både Expire och "
+ "Last-Modified behållas i cachen? Om du sätter den "
+ "här variabeln till noll kommer de inte att sparas alls.");
globvar("cache_gc_logfile", "",
"Proxy disk cache: "
1577:
"files, cache and disk status goes here.",
0, cache_disabled_p);
+ deflocaledoc("svenska", "cache_gc_logfile",
+ "Proxydiskcache: Loggfil",
+ "Information om cacherensningskörningar sparas i den här filen"
+ ".");
/// End of cache variables..
globvar("docurl2", "http://www.roxen.com/documentation/context.pike?page=",
"Documentation URL", TYPE_STRING|VAR_MORE,
"The URL to prepend to all documentation urls throughout the "
"server. This URL should _not_ end with a '/'.");
-
+ deflocaledoc("svenska", "docurl2", "DokumentationsURL",
+ "DokumentationsURLen används för att få kontextkänslig hjälp");
- globvar("pidfile", "/tmp/roxen_pid:$uid", "PID file",
+ globvar("pidfile", "/tmp/roxen_pid_$uid", "PID file",
TYPE_FILE|VAR_MORE,
"In this file, the server will write out it's PID, and the PID "
"of the start script. $pid will be replaced with the pid, and "
"$uid with the uid of the user running the process.");
-
+ deflocaledoc("svenska", "pidfile", "ProcessIDfil",
+ "I den här filen sparas roxen processid och processidt "
+ "for roxens start-skript. $uid byts ut mot användaridt hos "
+ "den användare som kör roxen");
globvar("default_ident", 1, "Identify: Use default identification string",
TYPE_FLAG|VAR_MORE,
1604:
"attacks against software that is known to contain security "
"holes. Server implementors are encouraged to make this field "
"a configurable option.</i></blockquote>");
+ deflocaledoc("svenska", "default_ident", "Identitet: Använd roxens normala"
+ " identitetssträng",
+ "Ska roxen använda sitt normala namn ("+real_version+")."
+ "Om du sätter den här variabeln till 'nej' så kommer du att "
+ "få välja vad roxen ska kalla sig.");
globvar("ident", replace(real_version," ","·"), "Identify: Identify as",
TYPE_STRING /* |VAR_MORE */,
"Enter the name that Roxen should use when talking to clients. ",
0, ident_disabled_p);
-
+ deflocaledoc("svenska", "ident", "Identitet: Roxens identitet",
+ "Det här är det namn som roxen kommer att använda sig av.");
-
+
globvar("DOC", 1, "Configuration interface: Help texts", TYPE_FLAG|VAR_MORE,
"Do you want documentation? (this is an example of documentation)");
-
+ deflocaledoc("svenska", "DOC", "Konfigurationsinterfacet: Hjälptexter",
+ "Vill du ha hjälptexter (den här texten är en typisk "
+ " hjälptext)");
-
+
globvar("NumAccept", 1, "Number of accepts to attempt",
TYPE_INT_LIST|VAR_MORE,
"You can here state the maximum number of accepts to attempt for "
"each read callback from the main socket. <p> Increasing this value "
- "will make the server "
- "faster for users making many simultaneous connections to it, or"
- " if you have a very busy server. <p> It won't work on some systems"
- ", though, eg. IBM AIX 3.2<p> To see if it works, change this"
- " variable, <b> but don't press save</b>, and then try connecting to"
- " your server. If it works, come back here and press the save button"
- ". <p> If it doesn't work, just restart the server and be happy "
- "with having '1' in this field.<p>"
- "The higher you set this value, the less load balancing between "
- "virtual servers. (If there are 256 more or less simultaneous "
+ "will make the server faster for users making many simultaneous "
+ "connections to it, or if you have a very busy server. The higher "
+ "you set this value, the less load balancing between virtual "
+ "servers. (If there are 256 more or less simultaneous "
"requests to server 1, and one to server 2, and this variable is "
"set to 256, the 256 accesses to the first server might very well "
"be handled before the one to the second server.)",
({ 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 }));
-
+ deflocaledoc("svenska", "NumAccept",
+ "Uppkopplingsmottagningsförsök per varv i huvudloopen",
+ "Antalet uppkopplingsmottagningsförsök per varv i huvudlopen. "
+ "Om du ökar det här värdet så kan server svara snabbare om "
+ "väldigt många använder den, men lastbalanseringen mellan dina "
+ "virtuella servrar kommer att bli mycket sämre (tänk dig att "
+ "det ligger 255 uppkopplingar och väntar i kön för en server"
+ ", och en uppkoppling i kön till din andra server, och du "
+ " har satt den här variabeln till 256. Alla de 255 "
+ "uppkopplingarna mot den första servern kan då komma "
+ "att hanteras <b>före</b> den ensamma uppkopplingen till "
+ "den andra server.");
-
+
globvar("ConfigPorts", ({ ({ 22202, "http", "ANY", "" }) }),
"Configuration interface: Ports",
TYPE_PORTS,
- "These are the ports through which you can configure the "
- "server.<br>Note that you should at least have one open port, since "
- "otherwise you won't be able to configure your server.");
+ #"These are the ports through which you can configure the server.<br>
-
+ Note that you should at least have one open port, since otherwise you won't be
+ able to configure your server.");
+
+ deflocaledoc("svenska", "ConfigPorts",
+ "Konfigurationsinterfacet: Portar",
+ #"Det här är de portar som du kan använda för att konfigurera
+ servern. <br>
+
+ Notera att du alltid bör ha <b>minst</b> en port öppen, så om du
+ t.ex. ska flytta konfigurationsinterfacet från en http port till en ssl3 port,
+ ta inte bort den gamla porten innan du har verifierat att den nya verkligen
+ fungerar. Det är rätt svårt att konfigurera roxen utan dess
+ konfigurationsinterface, även om det går.");
+
+
globvar("ConfigurationURL",
"",
"Configuration interface: URL", TYPE_STRING,
"The URL of the configuration interface. This is used to "
"generate redirects now and then (when you press save, when "
"a module is added, etc.).");
-
+ deflocaledoc("svenska", "ConfigurationURL",
+ "Konfigurationsinterfacet: URL",
+ #"Konfigurationsinterfacets URL. Normalt sätt så behöver du
+ inte ställa in den här variabeln, eftersom den automatiskt genereras från
+ portvariablen, men ibland kan det vara bra att kunna ställa in den.");
globvar("ConfigurationPassword", "", "Configuration interface: Password",
TYPE_PASSWORD|VAR_EXPERT,
1656:
"configuration interface will _not_ require an additional entry "
"of the password, so it is easy to make a typo. It is recommended "
"that you use the <a href=/(changepass)/Globals/>form instead</a>.");
+ deflocaledoc("svenska", "ConfigurationPassword",
+ "Konfigurationsinterface: Lösenord",
+ #"Den här variablen bör du inte pilla på. Men det är lösenordet
+ för användaren som ska få konfigurera roxen, krypterat med crypt(3)");
globvar("ConfigurationUser", "", "Configuration interface: User",
TYPE_STRING|VAR_EXPERT,
"The username you will have to enter to use the configuration "
"interface");
-
+ deflocaledoc("svenska", "ConfigurationUser",
+ "Konfigurationsinterface: Användare",
+ #"Den här variablen bör du inte pilla på. Men det är användaren
+ som ska få konfigurera roxen");
globvar("ConfigurationIPpattern","*", "Configuration interface: IP-Pattern",
TYPE_STRING|VAR_MORE,
"Only clients running on computers with IP numbers matching "
"this pattern will be able to use the configuration "
"interface.");
-
+ deflocaledoc("svenska", "ConfigurationIPpattern",
+ "Konfigurationsinterfacet: IPnummermönster",
+ #"Bara klienters vars datorers IP-nummer matchar det här mönstret
+ kan ansluta till konfigurationsinterfacet. Ett normalt mönster är ditt lokala
+ C-nät, t.ex. 194.52.182.*.");
globvar("User", "", "Change uid and gid to", TYPE_STRING,
"When roxen is run as root, to be able to open port 80 "
1674:
" has been opened. If you specify a symbolic username, the "
"default group of that user will be used. "
"The syntax is user[:group].");
+ deflocaledoc("svenska", "User", "Byt UID till",
+ #"När roxen startas som root, för att kunna öppna port 80 och köra CGI skript
+ samt pike skript som den användare som äger dem, så kan du om du vill
+ specifiera ett användarnamn här. Roxen kommer om du gör det att byta till den
+ användaren när så fort den har öppnat sina portar. Roxen kan dock fortfarande
+ byta tillbaka till root för att köra skript som rätt användare om du inte
+ sätter variabeln 'Byt UID och GID permanent' till ja. Användaren kan
+ specifieras antingen som ett symbolisk användarnamn (t.ex. 'www') eller som ett
+ numeriskt användarID. Om du vill kan du specifera vilken grupp som ska
+ användas genom att skriva användare:grupp. Normalt sätt så används användarens
+ normal grupper.");
globvar("permanent_uid", 0, "Change uid and gid permanently",
TYPE_FLAG,
1681:
"permanently. This disables the 'exec script as user' fetures "
"for CGI, and also access files as user in the filesystems, but "
"it gives better security.");
+ deflocaledoc("svenska", "permanent_uid",
+ "Byt UID och GID permanent",
+ #"Om roxen byter UID och GID permament kommer det inte gå att konfigurera nya
+ portar under 1024, det kommer inte heller gå att köra CGI och pike skript som
+ den användare som äger skriptet. Däremot så kommer säkerheten att vara högre,
+ eftersom ingen kan få roxen att göra något som administratöranvändaren
+ root");
globvar("ModuleDirs", ({ "../local/modules/", "modules/" }),
"Module directories", TYPE_DIR_LIST,
1688:
"modules. Can be relative paths, from the "
"directory you started roxen, " + getcwd() + " this time."
" The directories are searched in order for modules.");
+ deflocaledoc("svenska", "ModuleDirs", "Modulsökväg",
+ #"En lista av directoryn som kommer att sökas igenom när en
+ modul ska laddas. Directorynamnen kan vara relativa från "+getcwd()+
+ ", och de kommer att sökas igenom i den ordning som de står i listan.");
globvar("Supports", "#include <etc/supports>\n",
"Client supports regexps", TYPE_TEXT_FIELD|VAR_MORE,
1701:
" from the list of features of that client. All patterns that match"
" each given client-name are combined to form the final feature list"
". See the file etc/supports for examples.");
+ deflocaledoc("svenska", "Supports",
+ "Bläddrarfunktionalitetsdatabas",
+ #"En databas över vilka funktioner de olika bläddrarna som används klarar av.
+ Normalt sätt så hämtas den här databasen från filen server/etc/supports, men
+ du kan om du vill specifiera fler mönster i den här variabeln. Formatet ser
+ ur så här:<pre>
+ reguljärt uttryck som matchar bäddrarens namn funktion, funktion, ...
+ </pre>Se filen server/etc/supports för en mer utförlig dokumentation");
globvar("audit", 0, "Audit trail", TYPE_FLAG,
"If Audit trail is set to Yes, all changes of uid will be "
"logged in the Event log.");
-
+ deflocaledoc("svenska", "audit", "Logga alla användaridväxlingar",
+ #"Om du slår på den är funktionen så kommer roxen logga i debugloggen (eller
+ systemloggen om den funktionen används) så fort användaridt byts av någon
+ anlending.");
#if efun(syslog)
globvar("LogA", "file", "Logging method", TYPE_STRING_LIST|VAR_MORE,
1713: Inside #if efun(syslog)
" sent to stdout and stderr, but this is handled by the "
"start script.",
({ "file", "syslog" }));
+ deflocaledoc("svenska", "LogA", "Loggningsmetod",
+ #"Hur ska roxens debug, fel, informations och varningsmeddelanden loggas?
+ Normalt sätt så loggas de tilldebugloggen (logs/debug/defaul.1 etc), men de
+ kan även skickas till systemloggen kan om du vill.",
+ ([ "file":"loggfil",
+ "syslog":"systemloggen"]));
globvar("LogSP", 1, "Syslog: Log PID", TYPE_FLAG,
"If set, the PID will be included in the syslog.", 0,
syslog_disabled);
-
+ deflocaledoc("svenska", "LogSP", "Systemlogg: Logga roxens processid",
+ "Ska roxens processid loggas i systemloggen?");
globvar("LogCO", 0, "Syslog: Log to system console", TYPE_FLAG,
"If set and syslog is used, the error/debug message will be printed"
" to the system console as well as to the system log.",
0, syslog_disabled);
-
+ deflocaledoc("svenska", "LogCO", "Systemlogg: Logga till konsolen",
+ "Ska roxen logga till konsolen? Om den här variabeln är satt "
+ "kommer alla meddelanden som går till systemloggen att även "
+ "skickas till datorns konsol.");
globvar("LogST", "Daemon", "Syslog: Log type", TYPE_STRING_LIST,
"When using SYSLOG, which log type should be used.",
({ "Daemon", "Local 0", "Local 1", "Local 2", "Local 3",
"Local 4", "Local 5", "Local 6", "Local 7", "User" }),
syslog_disabled);
-
+ deflocaledoc( "svenska", "LogST", "Systemlogg: Loggningstyp",
+ "När systemloggen används, vilken loggningstyp ska "
+ "roxen använda?");
globvar("LogWH", "Errors", "Syslog: Log what", TYPE_STRING_LIST,
"When syslog is used, how much should be sent to it?<br><hr>"
1738: Inside #if efun(syslog)
"All: Everything<br>",
({ "Fatal", "Errors", "Warnings", "Debug", "All" }),
syslog_disabled);
+ deflocaledoc("svenska", "LogWH", "Systemlogg: Logga vad",
+ "När systemlogen används, vad ska skickas till den?<br><hr>"
+ "Fatala: Bara felmeddelenaden som är uppmärkta som fatala<br>"+
+ "Fel: Bara felmeddelanden och fatala fel<br>"+
+ "Varningar: Samma som ovan, men även alla varningsmeddelanden<br>"+
+ "Debug: Samma som ovan, men även alla felmeddelanden<br>"+
+ "Allt: Allt<br>",
+ ([ "Fatal":"Fatala",
+ "Errors":"Fel",
+ "Warnings":"Varningar",
+ "Debug":"Debug",
+ "All":"Allt" ]));
globvar("LogNA", "Roxen", "Syslog: Log as", TYPE_STRING,
"When syslog is used, this will be the identification of the "
"Roxen daemon. The entered value will be appended to all logs.",
0, syslog_disabled);
-
+ deflocaledoc("svenska", "LogNA",
+ "Systemlogg: Logga som",
+ #"När systemloggen används så kommer värdet av den här variabeln användas
+ för att identifiera den här roxenservern i loggarna.");
#endif
#ifdef THREADS
1753: Inside #if defined(THREADS)
"system.\n"
"<i>This is quite useful if you have more than one CPU in "
"your machine, or if you have a lot of slow NFS accesses.</i>");
+ deflocaledoc("svenska", "numthreads",
+ "Antal trådar",
+ #"Roxen har en så kallad trådpool. Varje förfrågan som kommer in till roxen
+ hanteras av en tråd, om alla trådar är upptagna så ställs frågan i en kö.
+ Det är bara själva hittandet av rätt fil att skicka som använder de här
+ trådarna, skickandet av svaret till klienten sker i bakgrunden, så du behöver
+ bara ta hänsyn till evenetuella processorintensiva saker (som <gtext>)
+ när då ställer in den här variabeln. Skönskvärdet 5 räcker för de allra
+ flesta servrar");
#endif
globvar("AutoUpdate", 1, "Update the supports database automatically",
1761:
"from www.roxen.com now and then. This is recomended, since "
"you will then automatically get supports information for new "
"clients, and new versions of old ones.");
+ deflocaledoc("svenska", "AutoUpdate",
+ "Uppdatera 'supports' databasen automatiskt",
+ #"Ska supportsdatabasen uppdateras automatiskt från www.roxen.com en gång per
+ vecka? Om den här optionen är påslagen så kommer roxen att försöka ladda ner
+ en ny version av filen etc/supports från http://www.roxen.com/supports en
+ gång per vecka. Det är rekommenderat att du låter den vara på, eftersom det
+ kommer nya versioner av bläddrare hela tiden, som kan hantera nya saker.");
globvar("next_supports_update", time()+3600, "", TYPE_INT,"",0,1);
globvar("abs_engage", 0, "Anti-Block-System: Enable", TYPE_FLAG|VAR_MORE,
- "If set, it will enable the anti-block-system. "
- "This will restart the server after a configurable number of minutes if it "
- "locks up. If you are running in a single threaded environment heavy calculations "
- "will also halt the server. In multi-threaded mode bugs as eternal loops will not "
- "cause the server to reboot, since only one thread is blocked. In general there is "
- "no harm in having this option enabled. ");
+ #"If set, the anti-block-system will be enabled.
+ This will restart the server after a configurable number of minutes if it
+ locks up. If you are running in a single threaded environment heavy
+ calculations will also halt the server. In multi-threaded mode bugs such as
+ eternal loops will not cause the server to reboot, since only one thread is
+ blocked. In general there is no harm in having this option enabled. ");
+ deflocaledoc("svenska", "abs_engage",
+ "AntiBlockSystem: Slå på AntiBlockSystemet",
+ #"Ska antilåssystemet vara igång? Om det är det så kommer roxen automatiskt
+ att starta om om den har hängt sig mer än några minuter. Oftast så beror
+ hängningar på buggar i antingen operativsystemet eller i en modul. Den
+ senare typen av hängningar påverkar inte en trådad roxen, medans den första
+ typen gör det.");
- globvar("abs_timeout", 5, "Anti-Block-System: Timeout", TYPE_INT_LIST | VAR_MORE,
- "If the server is unable to accept connection for this many "
- "minutes, it will be restarted. You need to find a balance: "
- "if set too low, the server will be restarted even if it's doing "
- "legal things (like generating many images), if set too high you will "
- "have long downtimes.",
+ globvar("abs_timeout", 5, "Anti-Block-System: Timeout",
+ TYPE_INT_LIST|VAR_MORE,
+ #"If the server is unable to accept connection for this many
+ minutes, it will be restarted. You need to find a balance:
+ if set too low, the server will be restarted even if it's doing
+ legal things (like generating many images), if set too high you might
+ get a long downtime if the server for some reason locks up.",
({1,2,3,4,5,10,15}),
- lambda() {return !QUERY(abs_engage);}
- );
+ lambda() {return !QUERY(abs_engage);});
- globvar ("suicide_engage",
+ deflocaledoc("svenska", "abs_timeout",
+ "AntiBlockSystem: Tidsbegränsning",
+ #"Om servern inte svarar på några frågor under så här många
+ minuter så kommer roxen startas om automatiskt. Om du
+ har en väldigt långsam dator kan en minut vara för
+ kort tid för en del saker, t.ex. diagramritning kan ta
+ ett bra tag.");
+
+
+ globvar("locale", "standard", "Language", TYPE_STRING_LIST,
+ "Locale, used to localise all messages in roxen"
+ #"Standard means using the default locale, which varies according to the
+ value of the 'LANG' environment variable.", sort(indices(Locale.Roxen)));
+ deflocaledoc("svenska", "locale", "Språk",
+ "Den här variablen anger vilket språk roxen ska använda. "
+ "'standard' betyder att språket sätts automatiskt från "
+ "värdet av omgivningsvariabeln LANG.");
+
+ globvar("suicide_engage",
0,
"Automatic Restart: Enable",
TYPE_FLAG|VAR_MORE,
- "If set, Roxen will automatically restart after a configurable number "
- "of days. Since Roxen uses a monolith, non-forking server "
- "model the process tends to grow in size over time. This is mainly due to "
- "heap fragmentation but also because of memory leaks."
+ #"If set, Roxen will automatically restart after a configurable number of
+ days. Since Roxen uses a monolith, non-forking server model the process tends
+ to grow in size over time. This is mainly due to heap fragmentation but also
+ because of memory leaks."
);
-
+ deflocaledoc("svenska", "suicide_engage",
+ "Automatisk omstart: Starta om automatiskt",
+ #"Roxen har stöd för att starta automatiskt då ock då. Eftersom roxen är en
+ monolitisk icke-forkande server (en enda långlivad process) så tenderar
+ processen att växa med tiden. Det beror mest på minnesfragmentation, men även
+ på att en del minnesläckor fortfarande finns kvar. Ett sätt att återvinna minne
+ är att starta om servern lite då och då, vilket roxen kommer att göra om du
+ slår på den här funktionen. Notera att det tar ett litet tag att starta om
+ servern.");
globvar("suicide_timeout",
7,
1798:
TYPE_INT_LIST|VAR_MORE,
"Automatically restart the server after this many days.",
({1,2,3,4,5,6,7,14,30}),
- lambda(){return !QUERY(suicide_engage);}
- );
+ lambda(){return !QUERY(suicide_engage);});
+ deflocaledoc("svenska", "suicide_timeout",
+ "Automatisk omstart: Tidsbegränsning (i dagar)",
+ #"Om roxen är inställd till att starta om automatiskt, starta om
+ så här ofta. Tiden är angiven i dagar");
-
+
setvars(retrieve("Variables", 0));
for(p = 1; p < argc; p++)
1952:
foreach( q, file )
{
- _master->set_inhibit_compile_errors("");
+ object e = ErrorContainer();
+ master()->set_inhibit_compile_errors(e->got_error);
if ( file[0]!='.' && !backup_extension(file) && (file[-1]!='z'))
{
array stat = file_stat(path+file);
2041:
} else {
// Load failed.
module_stat_cache[path+file]=0;
- _master->errors += "\n";
- if (arrayp(err)) {
- _master->errors += path + file + ": " +
- describe_backtrace(err) + "\n";
- } else {
- _master->errors += path + file + ": " + err;
+ e->errors += "\n";
+ // if (arrayp(err)) {
+ // e->errors += path + file + ":" +describe_backtrace(err) + "\n";
+ // } else {
+ // _master->errors += path + file + ": " + err;
+ // }
}
}
- }
+
MD_PERROR(("\n"));
}
}
- if(strlen(_master->errors)) {
- report_debug(LOCALE->module_compilation_errors(d, _master->errors));
+ master()->set_inhibit_compile_errors(0);
+ if(strlen(e->get())) {
+ report_debug(LOCALE->module_compilation_errors(d, e->get()));
}
- _master->set_inhibit_compile_errors(0);
+
}
}
2219:
// Roxen :) It has not changed all that much since Spider 2.0.
int main(int|void argc, array (string)|void argv)
{
+ if(getenv("LANG")=="sv")
+ default_locale = ( Locale.Roxen.svenska );
+ // else
+ // SET_LOCALE( Locale.Roxen.standard );
SET_LOCALE(default_locale);
initiate_languages();
mixed tmp;
2227:
add_constant("write", perror);
- report_notice(LOCALE->starting_roxen());
+
mark_fd(0, "Stdin");
mark_fd(1, "Stdout");
2254:
roxen_perror("Restart initiated at "+ctime(time()));
define_global_variables(argc, argv);
+ object o;
+ if(QUERY(locale) != "standard" && (o = Locale.Roxen[QUERY(locale)]))
+ {
+ default_locale = o;
+ SET_LOCALE(default_locale);
+ }
+ report_notice(LOCALE->starting_roxen());
create_pid_file(QUERY(pidfile));
2356:
else
remove_call_out(restart);
break;
+ case "locale":
+ object o;
+ if(value != "standard" && (o = Locale.Roxen[value]))
+ {
+ default_locale = o;
+ SET_LOCALE(default_locale);
+ if(root)
+ {
+ // destruct(root);
+ // configuration_interface()->root = configuration_interface()->Node();
+ configuration_interface()->
+ build_root(configuration_interface()->root);
}
}
-
+ break;
+ }
+ }