aboutsummaryrefslogtreecommitdiffstats
path: root/po/cs.po
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2004-09-05 12:36:16 +0000
committerMiloslav Trmac <mitr@volny.cz>2004-09-05 12:36:16 +0000
commit8f3b698d67b07d94076e5f8b18778ad616e20af8 (patch)
tree74daeafafbcf2695c4e0585f07a7d0ade979aea8 /po/cs.po
parentcf960039720f3b4b50eef1190537b2d0fbd8071b (diff)
downloadinitscripts-8f3b698d67b07d94076e5f8b18778ad616e20af8.tar
initscripts-8f3b698d67b07d94076e5f8b18778ad616e20af8.tar.gz
initscripts-8f3b698d67b07d94076e5f8b18778ad616e20af8.tar.bz2
initscripts-8f3b698d67b07d94076e5f8b18778ad616e20af8.tar.xz
initscripts-8f3b698d67b07d94076e5f8b18778ad616e20af8.zip
Minor fixes to Czech translation
Diffstat (limited to 'po/cs.po')
-rw-r--r--po/cs.po10
1 files changed, 5 insertions, 5 deletions
diff --git a/po/cs.po b/po/cs.po
index 489ce577..2cf837df 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: initscripts VERSION\n"
"POT-Creation-Date: 2001-02-05 22:36-0500\n"
-"PO-Revision-Date: 2004-07-25 15:37+0200\n"
+"PO-Revision-Date: 2004-09-05 13:27+0200\n"
"Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
@@ -27,7 +27,7 @@ msgstr "Startuji UPS monitor (podřízený): "
#: /etc/rc.d/init.d/crond:51
msgid "Reloading cron daemon configuration: "
-msgstr "Znovu zavádím konfiguraci cron démona: "
+msgstr "Znovu zavádím konfiguraci démona cron: "
#: /etc/sysconfig/network-scripts/ifup-ipv6:218
msgid ""
@@ -582,7 +582,7 @@ msgstr "Použití: radvd {start|stop|status|restart|reload|condrestart}"
#: /etc/sysconfig/network-scripts/ifup-aliases:67
msgid "usage: ifup-aliases <net-device> [<parent-config>]\n"
-msgstr "Použití: ifup-aliases <síťové_zařízení> [<parent-config>]\n"
+msgstr "Použití: ifup-aliases <síťové_zařízení> [<nastavení-rodiče>]\n"
#: /etc/rc.d/rc.sysinit:164
msgid "Loading default keymap"
@@ -887,7 +887,7 @@ msgstr "Použití: $0 {start|stop|status|restart|reload|force-reload|condrestart
#: /etc/rc.d/rc.sysinit:717
msgid "Initializing firewire controller ($alias): "
-msgstr "Inicializuji kontrolér firewire ($alias): "
+msgstr "Inicializuji řadič firewire ($alias): "
#: /etc/rc.d/init.d/isicom:36
msgid "Disabling PLX devices... "
@@ -1969,7 +1969,7 @@ msgstr "${base} neběží, ale PID soubor existuje"
#: /etc/rc.d/rc.sysinit:193
msgid "Initializing USB controller ($alias): "
-msgstr "Inicializuji kontrolér USB ($alias): "
+msgstr "Inicializuji řadič USB ($alias): "
#: /etc/rc.d/init.d/mysqld:104
msgid "Usage: $0 {start|stop|status|condrestart|restart}"
51 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
/*
 * Guillaume Cottenceau (gc@mandrakesoft.com)
 * Olivier Blin (oblin@mandrakesoft.com)
 *
 * Copyright 2005 Mandrakesoft
 *
 * This software may be freely redistributed under the terms of the GNU
 * public license.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>

#include "stage1.h"
#include "log.h"
#include "insmod.h"
#include "modules.h"
#include "mount.h"
#include "frontend.h"
#include "partition.h"
#include "automatic.h"

#include "thirdparty.h"

#define THIRDPARTY_MOUNT_LOCATION "/tmp/thirdparty"

static enum return_type third_party_choose_device(char ** device)
{
	char ** medias, ** medias_models;
	char ** ptr, ** ptr_models;
#ifndef DISABLE_DISK
	char ** disk_medias, ** disk_medias_models;
	int disk_count;
	char * parts[50];
	char * parts_comments[50];
#endif
#ifndef DISABLE_CDROM
	char ** cdrom_medias, ** cdrom_medias_models;
	int cdrom_count;
#endif
	char * floppy_dev;
	enum return_type results;
	int count = 0;

	wait_message("Looking for floppy, disk and cdrom devices ...");

#ifndef DISABLE_DISK
	disk_count = get_disks(&disk_medias, &disk_medias_models);
	count += disk_count;
#endif
#ifndef DISABLE_CDROM
        cdrom_count = get_cdroms(&cdrom_medias, &cdrom_medias_models);
        count += cdrom_count;
#endif

	floppy_dev = floppy_device();
	if (strstr(floppy_dev, "/dev/") == floppy_dev) {
		floppy_dev = floppy_dev + 5;
	}
	if (floppy_dev)
		count += 1;

	remove_wait_message();

	if (count == 0) {
		stg1_error_message("I can't find any floppy, disk or cdrom on this system. "
				   "No third-party kernel modules will be used.");
		return RETURN_BACK;
	}


	ptr = medias = malloc((count + 1) * sizeof(char *));
	ptr_models =medias_models = malloc((count + 1) * sizeof(char *));
#ifndef DISABLE_DISK
	memcpy(ptr, disk_medias, disk_count * sizeof(char *));
	memcpy(ptr_models, disk_medias_models, disk_count * sizeof(char *));
	free(disk_medias);
	free(disk_medias_models);
	ptr += disk_count;
	ptr_models += disk_count;
#endif
#ifndef DISABLE_CDROM
	memcpy(ptr, cdrom_medias, cdrom_count * sizeof(char *));
	memcpy(ptr_models, cdrom_medias_models, cdrom_count * sizeof(char *));
	free(cdrom_medias);
	free(cdrom_medias_models);
	cdrom_medias = ptr; /* used later to know if a cdrom is selected */
	ptr += cdrom_count;
	ptr_models += cdrom_count;
#endif
	if (floppy_dev) {
		ptr[0] = floppy_dev;
		ptr_models[0] = "Floppy device";
		ptr++;
		ptr_models++;
 	}
	ptr[0] = NULL;
	ptr_models[0] = NULL;

	if (count == 1) {
		*device = medias[0];
	}  else {
		results = ask_from_list_comments("If you want to insert third-party kernel modules, "
						 "please select the disk containing the modules.",
						 medias, medias_models, device);
		if (results != RETURN_OK)
			return results;
	}
 
	/* a floppy is selected, don't try to list partitions */
	if (streq(*device, floppy_dev)) {
		return RETURN_OK;
	}

#ifndef DISABLE_CDROM
	/* a cdrom is selected, don't try to list partitions */
	if (device >= cdrom_medias) {
		return RETURN_OK;
	}
#endif

#ifndef DISABLE_DISK
	/* a disk or usb key is selected */
	if (list_partitions(*device, parts, parts_comments)) {
		stg1_error_message("Could not read partitions information.");
		return RETURN_ERROR;
	}

	if (parts[0] == NULL) {
		stg1_error_message("No partition found.");
		return RETURN_ERROR;
	}

	/* only one partition has been discovered, don't ask which one to use */
	if (parts[1] == NULL) {
		*device = parts[0];
		return RETURN_OK;
        }

	results = ask_from_list_comments("Please select the partition containing "
					 "the third party modules.",
					 parts, parts_comments, device);
	if (results == RETURN_OK)
		return RETURN_OK;
#endif

	stg1_error_message("Sorry, no third party device can be used.");

	return RETURN_BACK;
}


static enum return_type thirdparty_mount_device(char * device)
{
        log_message("third party : trying to mount device %s", device);
	if (try_mount(device, THIRDPARTY_MOUNT_LOCATION) == -1) {
		stg1_error_message("I can't mount the selected device (%s).", device);
		return RETURN_ERROR;
	}
	return RETURN_OK;
}


static enum return_type thirdparty_prompt_modules(char ** modules_list)
{
	enum return_type results;
	char final_name[500];
	char *module_name;
	int rc;
	char * questions[] = { "Options", NULL };
	static char ** answers = NULL;

	while (1) {
		results = ask_from_list("Which driver would you like to insmod?", modules_list, &module_name);
		if (results != RETURN_OK)
			break;

		sprintf(final_name, "%s/%s", THIRDPARTY_MOUNT_LOCATION, module_name);

		results = ask_from_entries("Please enter the options:", questions, &answers, 24, NULL);
		if (results != RETURN_OK)
			continue;

		rc = insmod_local_file(final_name, answers[0]);
		if (rc) {
			log_message("\tfailed");
			stg1_error_message("Insmod failed.");
		}
	}
	return RETURN_OK;
}


static enum return_type thirdparty_autoload_modules(char ** modules_list, FILE *f)
{
	while (1) {
		char final_name[500];
		char module[500];
		char * options;
		char ** entry = modules_list;

		if (!fgets(module, sizeof(module), f)) break;
		if (module[0] == '#' || strlen(module) == 0)
			continue;

		while (module[strlen(module)-1] == '\n')
			module[strlen(module)-1] = '\0';
		options = strchr(module, ' ');
		if (options) {
			options[0] = '\0';
			options++;
		}

		log_message("updatemodules: (%s) (%s)", module, options);
		while (entry && *entry) {
			if (!strncmp(*entry, module, strlen(module)) && (*entry)[strlen(module)] == '.') {
				sprintf(final_name, "%s/%s", THIRDPARTY_MOUNT_LOCATION, *entry);
				if (insmod_local_file(final_name, options)) {
					log_message("\t%s (floppy): failed", *entry);
					stg1_error_message("Insmod %s (floppy) failed.", *entry);
				}
				break;
			}
			entry++;
		}
		if (!entry || !*entry) {
			enum insmod_return ret = my_insmod(module, ANY_DRIVER_TYPE, options, 0);
			if (ret != INSMOD_OK) {
				log_message("\t%s (marfile): failed", module);
				stg1_error_message("Insmod %s (marfile) failed.", module);
			}
		}
	}
	fclose(f);

	return RETURN_OK;
}


void thirdparty_load_modules(void)
{
	enum return_type results;
	char * device = NULL;
	char ** modules_list;
	char toload_name[500];
	FILE * f;

	if (IS_AUTOMATIC) {
		device = get_auto_value("thirdparty");
		log_message("third party : trying automatic device %s", device);
		if (thirdparty_mount_device(device) != RETURN_OK)
			device = NULL;
	}

	while (!device || streq(device, "")) {
		results = third_party_choose_device(&device);
		if (results == RETURN_BACK)
			return;
		if (thirdparty_mount_device(device) != RETURN_OK)
			device = NULL;
	}

	log_message("third party : using device %s", device);

	modules_list = list_directory(THIRDPARTY_MOUNT_LOCATION);

	if (!modules_list || !*modules_list) {
		stg1_error_message("No modules found on disk.");
		umount(THIRDPARTY_MOUNT_LOCATION);
		return thirdparty_load_modules();
	}

	sprintf(toload_name, "%s/to_load", THIRDPARTY_MOUNT_LOCATION);
	f = fopen(toload_name, "rb");
	if (f) {
		results = thirdparty_autoload_modules(modules_list, f);
	} else {
		if (IS_AUTOMATIC)
			stg1_error_message("I can't find a \"to_load\" file. Please select the modules manually.");
		log_message("No \"to_load\" file, prompting for modules");
		results = thirdparty_prompt_modules(modules_list);
	}
	umount(THIRDPARTY_MOUNT_LOCATION);

	if (results == RETURN_OK)
		return;
	else
		return thirdparty_load_modules();
}