summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
Commit message (Expand)AuthorAgeFilesLines
* no need to have devfs=nomount anymore in root raidPascal Rigaux2001-08-291-1/+1
* add support for mandatory frame buffer support (SiS 630) need them for XF3 toFrancois Pons2001-08-291-3/+7
* do not modify fstab options in upgradePascal Rigaux2001-08-291-1/+2
* propose to format / and /usr even if isFormatted. More generally do not trust...Pascal Rigaux2001-08-281-1/+3
* added the missing security parameter to set_default_optionsPascal Rigaux2001-08-251-1/+1
* remove the cond_umount_hdimage and cond_remount_hdimagePascal Rigaux2001-08-241-2/+0
* fixed possible bug (not sorted partition when calling mount_part).Francois Pons2001-08-241-1/+2
* do init_db inside pkg_inside otherwise LOG is closed and rpmlib tries to writ...Pascal Rigaux2001-08-221-5/+0
* do not call configurePrinter if no printer is wantedPascal Rigaux2001-08-221-1/+1
* updated configurePrinter to use foomatic printer configuration.Francois Pons2001-08-221-21/+14
* try to fix umount/remounting /tmp/hdimage in hd installPascal Rigaux2001-08-211-12/+2
* try harder to umount /tmp/hdimage only when neededPascal Rigaux2001-08-201-7/+4
* rename isCdNotEjectable in usingRamdisk, ensure no files are removed unless w...Pascal Rigaux2001-08-191-2/+2
* make the devfs= mount or nomount choice based on raid-based root workPascal Rigaux2001-08-191-3/+5
* disable supermount for the momentPascal Rigaux2001-08-191-1/+1
* major fs.pm rework + adaptation to itPascal Rigaux2001-08-191-0/+3
* oops, i inverted devfs=nomount and devfs=mountPascal Rigaux2001-08-181-1/+1
* do not use devfs with root software raidPascal Rigaux2001-08-181-1/+2
* a hell lot of cleanup/rewrite:Pascal Rigaux2001-08-171-17/+15
* - fix behaviour of draknet when auto-installGuillaume Cottenceau2001-08-141-1/+1
* really use a class_discard for Xconfigurator::mainPascal Rigaux2001-08-131-2/+1
* initial revision for drakautoinstGuillaume Cottenceau2001-08-131-0/+1
* typoPascal Rigaux2001-08-081-1/+1
* makes interactive_pkgs stuff workPascal Rigaux2001-08-081-1/+3
* add interactive_pkgs stuffPascal Rigaux2001-08-081-1/+1
* (miscellaneous): defaults perImageAppend to devfs=mountPascal Rigaux2001-08-081-0/+2
* (choosePackages): simplify, fix setSelectedFromCompssList not called inPascal Rigaux2001-08-041-6/+4
* (choosePartitionsToFormat): toFormatUnsure=1 for /usrPascal Rigaux2001-08-031-1/+1
* update_userkderc is now called update_gnomekdercPascal Rigaux2001-08-031-1/+1
* handle auto_allocate_raids for auto_installsPascal Rigaux2001-08-011-1/+1
* fixed some silly typo and tiny bugs.Francois Pons2001-07-261-2/+4
* fixed typo as Diskette to Floppy.Francois Pons2001-07-261-4/+4
* add support for modified blank.img floppy and Update Modules floppy.Francois Pons2001-07-261-1/+62
* do not export sync, keep it in common (esp. so that it doesn't conflict with ...Pascal Rigaux2001-07-251-1/+1
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-241-1/+1
* roll back some changes from PPC beta - OldWorld vs NewWorld bootloaderStew Benedict2001-07-181-1/+5
* disabled Frame buffer for all S3 cards (hangs with XF4 and S3 ViRGE on rebootFrancois Pons2001-07-171-1/+2
* fix typoPascal Rigaux2001-07-041-1/+1
* verify a /boot/efi partition existsPascal Rigaux2001-07-041-0/+4
* add ntp handlingPascal Rigaux2001-07-031-0/+2
* applied patches given for printer configuration bug reported by David Eastcott.Francois Pons2001-06-111-2/+2
* (addUser): accept gid's which already exist, and don't them in /etc/groupPascal Rigaux2001-06-051-2/+2
* added support for NVIDIA 3D acceleration.Francois Pons2001-04-251-1/+4
* corrected bad install package.damien2001-04-161-1/+1
* added conditional update-menus if package are installed.Francois Pons2001-04-131-0/+1
* create to_utf8 from po strings, use it for kdm messagePascal Rigaux2001-04-091-1/+1
* (afterInstallPackages): remove setting of kde charset in kdeglobals (kde is a...Pascal Rigaux2001-04-081-3/+0
* create install_any::write_fstab and use itPascal Rigaux2001-04-061-1/+1
* (exitInstall): oups, report_bug is no more in commands::Pascal Rigaux2001-04-051-1/+1
* (configureXBefore): fix the xkb verification (was broken for things like ``de...Pascal Rigaux2001-04-051-2/+1
pan class="hl com">/* methods */ int (*close)(int); int (*read) (int, char *, unsigned int *); int (*write)(int, char *, unsigned int *); }; static int close_method (int fd) { return close (fd); } static int write_method (int fd, char *buf, unsigned int *nump) { int num; if (-1 == (num = write (fd, buf, *nump))) { *nump = 0; return -1; } *nump = (unsigned int) num; return 0; } static int read_method (int fd, char *buf, unsigned int *nump) { int num; num = read (fd, buf, *nump); if (num == -1) { *nump = 0; return -1; } *nump = (unsigned int) num; return 0; } static int check_fd (int fd) { if (fd == -1) { #ifdef EBADF _SLerrno_errno = EBADF; #endif return -1; } return 0; } static int posix_close (SLFile_FD_Type *f) { if (-1 == check_fd (f->fd)) return -1; if ((f->close != NULL) && (-1 == f->close (f->fd))) { _SLerrno_errno = errno; return -1; } if (f->stdio_mmt != NULL) { SLang_free_mmt (f->stdio_mmt); f->stdio_mmt = NULL; } f->fd = -1; return 0; } /* Usage: Uint write (f, buf); */ static void posix_write (SLFile_FD_Type *f, SLang_BString_Type *bstr) { unsigned int len; char *p; if ((-1 == check_fd (f->fd)) || (NULL == (p = (char *)SLbstring_get_pointer (bstr, &len)))) { SLang_push_integer (-1); return; } if (-1 == f->write (f->fd, p, &len)) { _SLerrno_errno = errno; SLang_push_integer (-1); return; } (void) SLang_push_uinteger (len); } /* Usage: nn = read (f, &buf, n); */ static void posix_read (SLFile_FD_Type *f, SLang_Ref_Type *ref, unsigned int *nbytes) { unsigned int len; char *b; SLang_BString_Type *bstr; b = NULL; len = *nbytes; if ((-1 == check_fd (f->fd)) || (NULL == (b = SLmalloc (len + 1)))) goto return_error; if (-1 == f->read (f->fd, b, &len)) { _SLerrno_errno = errno; goto return_error; } if (len != *nbytes) { char *b1 = SLrealloc (b, len + 1); if (b1 == NULL) goto return_error; b = b1; } bstr = SLbstring_create_malloced ((unsigned char *) b, len, 0); if (bstr != NULL) { if ((-1 != SLang_assign_to_ref (ref, SLANG_BSTRING_TYPE, (VOID_STAR)&bstr)) && (-1 != SLang_push_uinteger (len))) return; SLbstring_free (bstr); b = NULL; /* drop */ } return_error: if (b != NULL) SLfree ((char *)b); (void) SLang_assign_to_ref (ref, SLANG_NULL_TYPE, NULL); (void) SLang_push_integer (-1); } SLFile_FD_Type *SLfile_create_fd (char *name, int fd) { SLFile_FD_Type *f; if (NULL == (f = (SLFile_FD_Type *) SLmalloc (sizeof (SLFile_FD_Type)))) return NULL; memset ((char *) f, 0, sizeof (SLFile_FD_Type)); if (NULL == (f->name = SLang_create_slstring (name))) { SLfree ((char *)f); return NULL; } f->fd = fd; f->num_refs = 1; f->close = close_method; f->read = read_method; f->write = write_method; return f; } SLFile_FD_Type *SLfile_dup_fd (SLFile_FD_Type *f0) { SLFile_FD_Type *f; int fd0, fd; if (f0 == NULL) return NULL; fd0 = f0->fd; if (-1 == check_fd (fd0)) return NULL; while (-1 == (fd = dup (fd0))) { #ifdef EINTR if (errno == EINTR) continue; #endif _SLerrno_errno = errno; return NULL; } if (NULL == (f = SLfile_create_fd (f0->name, fd))) { f0->close (fd); return NULL; } return f; } int SLfile_get_fd (SLFile_FD_Type *f, int *fd) { if (f == NULL) return -1; *fd = f->fd; if (-1 == check_fd (*fd)) return -1; return 0; } void SLfile_free_fd (SLFile_FD_Type *f) { if (f == NULL) return; if (f->num_refs > 1) { f->num_refs -= 1; return; } if (f->fd != -1) { if (f->close != NULL) (void) f->close (f->fd); f->fd = -1; } if (f->stdio_mmt != NULL) SLang_free_mmt (f->stdio_mmt); SLfree ((char *) f); } static int pop_string_int (char **s, int *i) { *s = NULL; if ((-1 == SLang_pop_integer (i)) || (-1 == SLang_pop_slstring (s))) return -1; return 0; } static int pop_string_int_int (char **s, int *a, int *b) { *s = NULL; if ((-1 == SLang_pop_integer (b)) || (-1 == pop_string_int (s, a))) return -1; return 0; } static void posix_open (void) { char *file; int mode, flags; SLFile_FD_Type *f; switch (SLang_Num_Function_Args) { case 3: if (-1 == pop_string_int_int (&file, &flags, &mode)) { SLang_push_null (); return; } break; case 2: default: if (-1 == pop_string_int (&file, &flags)) return; mode = 0777; break; } f = SLfile_create_fd (file, -1); if (f == NULL) { SLang_free_slstring (file); SLang_push_null (); return; } SLang_free_slstring (file); if (-1 == (f->fd = open (f->name, flags, mode))) { _SLerrno_errno = errno; SLfile_free_fd (f); SLang_push_null (); return; } if (-1 == SLfile_push_fd (f)) SLang_push_null (); SLfile_free_fd (f); } static void posix_fileno (void) { FILE *fp; SLang_MMT_Type *mmt; int fd; SLFile_FD_Type *f; char *name; if (-1 == SLang_pop_fileptr (&mmt, &fp)) { SLang_push_null (); return; } name = SLang_get_name_from_fileptr (mmt); fd = fileno (fp); f = SLfile_create_fd (name, fd); if (f != NULL) f->close = NULL; /* prevent fd from being closed * when it goes out of scope */ SLang_free_mmt (mmt); if (-1 == SLfile_push_fd (f)) SLang_push_null (); SLfile_free_fd (f); } static void posix_fdopen (SLFile_FD_Type *f, char *mode) { if (f->stdio_mmt == NULL) { if (-1 == _SLstdio_fdopen (f->name, f->fd, mode)) return; if (NULL == (f->stdio_mmt = SLang_pop_mmt (SLANG_FILE_PTR_TYPE))) return; } (void) SLang_push_mmt (f->stdio_mmt); } static long posix_lseek (SLFile_FD_Type *f, long ofs, int whence) { long status; if (-1 == (status = lseek (f->fd, ofs, whence))) _SLerrno_errno = errno; return status; } static int posix_isatty (void) { int ret; SLFile_FD_Type *f; if (SLang_peek_at_stack () == SLANG_FILE_PTR_TYPE) { SLang_MMT_Type *mmt; FILE *fp; if (-1 == SLang_pop_fileptr (&mmt, &fp)) return 0; /* invalid descriptor */ ret = isatty (fileno (fp)); SLang_free_mmt (mmt); return ret; } if (-1 == SLfile_pop_fd (&f)) return 0; ret = isatty (f->fd); SLfile_free_fd (f); return ret; } static void posix_dup (SLFile_FD_Type *f) { if ((NULL == (f = SLfile_dup_fd (f))) || (-1 == SLfile_push_fd (f))) SLang_push_null (); SLfile_free_fd (f); } #define I SLANG_INT_TYPE #define V SLANG_VOID_TYPE #define F SLANG_FILE_FD_TYPE #define B SLANG_BSTRING_TYPE #define R SLANG_REF_TYPE #define U SLANG_UINT_TYPE #define S SLANG_STRING_TYPE #define L SLANG_LONG_TYPE static SLang_Intrin_Fun_Type Fd_Name_Table [] = { MAKE_INTRINSIC_0("fileno", posix_fileno, V), MAKE_INTRINSIC_0("isatty", posix_isatty, I), MAKE_INTRINSIC_0("open", posix_open, V), MAKE_INTRINSIC_3("read", posix_read, V, F, R, U), MAKE_INTRINSIC_3("lseek", posix_lseek, L, F, L, I), MAKE_INTRINSIC_2("fdopen", posix_fdopen, V, F, S), MAKE_INTRINSIC_2("write", posix_write, V, F, B), MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F), MAKE_INTRINSIC_1("close", posix_close, I, F), SLANG_END_INTRIN_FUN_TABLE }; #undef I #undef V #undef F #undef B #undef R #undef S #undef L #undef U static SLang_IConstant_Type PosixIO_Consts [] = { #ifdef O_RDONLY MAKE_ICONSTANT("O_RDONLY", O_RDONLY), #endif #ifdef O_WRONLY MAKE_ICONSTANT("O_WRONLY", O_WRONLY), #endif #ifdef O_RDWR MAKE_ICONSTANT("O_RDWR", O_RDWR), #endif #ifdef O_APPEND MAKE_ICONSTANT("O_APPEND", O_APPEND), #endif #ifdef O_CREAT MAKE_ICONSTANT("O_CREAT", O_CREAT), #endif #ifdef O_EXCL MAKE_ICONSTANT("O_EXCL", O_EXCL), #endif #ifdef O_NOCTTY MAKE_ICONSTANT("O_NOCTTY", O_NOCTTY), #endif #ifdef O_NONBLOCK MAKE_ICONSTANT("O_NONBLOCK", O_NONBLOCK), #endif #ifdef O_TRUNC MAKE_ICONSTANT("O_TRUNC", O_TRUNC), #endif #ifndef O_BINARY # define O_BINARY 0 #endif MAKE_ICONSTANT("O_BINARY", O_BINARY), #ifndef O_TEXT # define O_TEXT 0 #endif MAKE_ICONSTANT("O_TEXT", O_TEXT), SLANG_END_ICONST_TABLE }; int SLfile_push_fd (SLFile_FD_Type *f) { if (f == NULL) return SLang_push_null (); f->num_refs += 1; if (0 == SLclass_push_ptr_obj (SLANG_FILE_FD_TYPE, (VOID_STAR) f)) return 0; f->num_refs -= 1; return -1; } int SLfile_pop_fd (SLFile_FD_Type **f) { return SLclass_pop_ptr_obj (SLANG_FILE_FD_TYPE, (VOID_STAR *) f); } static void destroy_fd_type (unsigned char type, VOID_STAR ptr) { (void) type; SLfile_free_fd (*(SLFile_FD_Type **) ptr); } static int fd_push (unsigned char type, VOID_STAR v) { (void) type; return SLfile_push_fd (*(SLFile_FD_Type **)v); } int SLang_init_posix_io (void) { SLang_Class_Type *cl; if (NULL == (cl = SLclass_allocate_class ("FD_Type"))) return -1; cl->cl_destroy = destroy_fd_type; (void) SLclass_set_push_function (cl, fd_push); if (-1 == SLclass_register_class (cl, SLANG_FILE_FD_TYPE, sizeof (SLFile_FD_Type), SLANG_CLASS_TYPE_PTR)) return -1; if ((-1 == SLadd_intrin_fun_table(Fd_Name_Table, "__POSIXIO__")) || (-1 == SLadd_iconstant_table (PosixIO_Consts, NULL)) || (-1 == _SLerrno_init ())) return -1; return 0; }