Commit Graph

129 Commits (008)

Author SHA1 Message Date
Harald Hoyer 7238aa0cf0 base/init: do not poll cdrom, if kernel supports polling 2011-02-02 13:56:03 +01:00
Harald Hoyer 444061de67 base/init: drop "noexec" from /dev/shm 2011-01-25 10:35:20 +01:00
Harald Hoyer 7f7a91b75f base/init: fix init executable check 2010-11-19 13:40:34 +01:00
Harald Hoyer 770b796e52 base/init: honor old "real_init=" 2010-11-19 13:37:17 +01:00
Harald Hoyer b2415f4414 base: use systemd-timestamp for RD_TIMESTAMP, if possible 2010-11-18 12:28:21 +01:00
Harald Hoyer 2eea164db7 base/init: do not set umask
somehow /dev/dri gets created with the wrong permissions
https://bugzilla.redhat.com/show_bug.cgi?id=626559
2010-11-17 17:37:22 +01:00
Harald Hoyer 5023964844 move initlog.pipe to /dev/.initramfs 2010-11-11 11:08:40 +01:00
Harald Hoyer 4af673c3f8 base/init: merge mkdir and add more mount options 2010-11-11 11:08:40 +01:00
Harald Hoyer 040f3d2ffc base/init: re-add initqueue-finished 2010-11-10 21:27:33 +01:00
Harald Hoyer 1fbe575888 base/init: removed scsi_wait_scan hack 2010-11-05 14:14:34 -04:00
Harald Hoyer 921f4b5b52 base/init: fixed " typo 2010-11-03 15:41:50 -04:00
Harald Hoyer 7853bbfa7d base/init: do not clean RD_* environment variables 2010-11-03 14:15:11 -04:00
Harald Hoyer c79517b4d9 base/init: fixed indention 2010-11-03 14:12:30 -04:00
Harald Hoyer 5e1898fa5a base/init: only mknod /dev/null, if it does not exist yet 2010-11-03 13:45:14 -04:00
Harald Hoyer 11a2ab6228 base/init: merge mkdir calls 2010-11-03 13:42:20 -04:00
Harald Hoyer 9b79345001 base/init: rd.shell=1 per default
to securely lock a machine, the admin has to set rd.shell=0!
2010-10-29 13:24:12 +02:00
Harald Hoyer 577b1fc833 base/init: s/RDTIMESTAMP/RD_TIMESTAMP/g
systemd will clear all RD_* env for its children
2010-10-28 18:09:45 +02:00
Harald Hoyer 6ef8e5b4d3 mkdir /dev/.initramfs with "-p" 2010-10-28 17:11:35 +02:00
Harald Hoyer 9bfff3746f base: send DRACUT_LOG_END to loginit at the end 2010-10-28 17:11:35 +02:00
Harald Hoyer 2c1f37d45c base/init: fix for /sbin/init being an absolute softlink 2010-10-28 17:11:34 +02:00
Harald Hoyer fa7ada31d0 new parameter option names with "rd.*" namespace
Renamed Options
       Here is a list of options, which were used in dracut prior to
       version 008, and their new replacement.

       rdbreak
           rd.break

       rd_CCW
           rd.ccw

       rdcopystate
           rd.copystate

       rd_DASD_MOD
           rd.dasd_mod.dasd

       rd_DASD
           rd.dasd

       rdinitdebug rdnetdebug
           rd.debug

       rd_NO_DM
           rd.dm=0

       rd_DM_UUID
           rd.dm.uuid

       rdblacklist
           rd.driver.blacklist

       rdinsmodpost
           rd.driver.post

       rdloaddriver
           rd.driver.pre

       rd_NO_FSTAB
           rd.fstab=0

       rdinfo
           rd.info

       check
           rd.live.check

       rdlivedebug
           rd.live.debug

       live_dir
           rd.live.dir

       liveimg
           rd.live.image

       overlay
           rd.live.overlay

       readonly_overlay
           rd.live.overlay.readonly

       reset_overlay
           rd.live.overlay.reset

       live_ram
           rd.live.ram

       rd_NO_CRYPTTAB
           rd.luks.crypttab=0

       rd_LUKS_KEYDEV_UUID
           rd.luks.keydev.uuid

       rd_LUKS_KEYPATH
           rd.luks.keypath

       rd_NO_LUKS
           rd.luks=0

       rd_LUKS_UUID
           rd.luks.uuid

       rd_LUKS_UUID
           rd.luks.uuid

       rd_NO_LVMCONF
           rd.lvm.conf

       rd_LVM_LV
           rd.lvm.lv

       rd_NO_LVM
           rd.lvm=0

       rd_LVM_SNAPSHOT
           rd.lvm.snapshot

       rd_LVM_SNAPSIZE
           rd.lvm.snapsize

       rd_LVM_VG
           rd.lvm.vg

       rd_NO_MDADMCONF
           rd.md.conf=0

       rd_NO_MDIMSM
           rd.md.imsm=0

       rd_NO_MD
           rd.md=0

       rd_MD_UUID
           rd.md.uuid

       rd_NFS_DOMAIN
           rd.nfs.domain

       rd_NO_PLYMOUTH
           rd.plymouth=0

       rd_retry
           rd.retry

       rdshell
           rd.shell

       rd_NO_SPLASH
           rd.splash

       rdudevdebug
           rd.udev.debug

       rdudevinfo
           rd.udev.info

       rd_NO_ZFCPCONF
           rd.zfcp.conf=0

       rd_ZFCP
           rd.zfcp
2010-10-28 17:11:27 +02:00
Harald Hoyer bfd602f849 base: install switch_root to /sbin and call it with the full path 2010-10-25 12:31:38 +02:00
Harald Hoyer 2ca35ac7ee init: symlink /dev/stdin /dev/stdout /dev/stderr 2010-10-07 19:11:11 +02:00
Amadeusz Żołnowski 4bacdf2811 99base/init: honor env. vars provided by kernel (PATH, HOME and TERM)
Let take a look at Linux sources, /usr/src/linux-2.6.35/init/main.c:

  204: char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };

  857: run_init_process("/sbin/init");

  817: static void run_init_process(char *init_filename)
  818: {
  819:        argv_init[0] = init_filename;
  820:        kernel_execve(init_filename, argv_init, envp_init);
  821: }

As we can see HOME=/ and TERM=linux are provided for init and this might be
expected on some systems (Gentoo comes to my mind, here ;-)).  That's why we
should give to init the same set of env. vars as Linux kernel does.
2010-10-01 11:38:14 +02:00
Harald Hoyer 94388aaffa init: removed bogus nop line
+    initargs="$initargs"
2010-09-23 17:45:37 +02:00
Harald Hoyer 647bef8ca6 base/init: set RDTIMESTAMP
set $RDTIMESTAMP for init, if rd.timestamp is specified on the
kernel command line, so that systemd can print out:

"systemd: Boot finished after 15s = 3s (kernel) + 2s (initrd) + 10s
(userspace)"
2010-09-20 14:58:25 +02:00
Harald Hoyer 3636d59e38 base/init: unset HOME and TERM for real init 2010-09-20 14:53:45 +02:00
Harald Hoyer cc02093d69 reformat source code
removed tabs and set indention to 4 spaces
added emacs and vi format headers
2010-09-10 15:34:36 +02:00
Harald Hoyer c492fe12c0 init: create /dev/.udev/rules.d with correct permissions 2010-08-02 15:58:48 +02:00
Harald Hoyer db3641a2ea init: set old umask before switch_root 2010-08-02 14:17:59 +02:00
Harald Hoyer e001359311 mknod with mode and set umask for the rest 2010-07-23 11:30:45 +02:00
Harald Hoyer 85fd75f91f add rd_retry kernel command line parameter
rd_retry=<seconds to retry in the main loop>

speeds up internal test suite
2010-04-16 17:59:50 +02:00
Harald Hoyer 4058d85cb6 init: do not redirect to - 2010-04-16 17:59:49 +02:00
Harald Hoyer 2937028c54 init: fix cdrom polling loop 2010-04-16 17:59:49 +02:00
Harald Hoyer cd83e4c54d init: trigger with --action=add 2010-04-14 16:36:30 +02:00
Harald Hoyer 0e0bf83057 init: add hacky cdrom polling mechanism 2010-04-13 13:51:49 +02:00
Andrey Borzenkov b63fd4d905 Pass init argument(s) to real init
Common wisdom to enter single user on Linux is to edit command
line and add "single". This was not possible because switch_root
was always called with empty init arguments. Collect them from
command line and pass to real init when switching root.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
2010-03-04 14:06:48 +01:00
Harald Hoyer bab749e23e init: dashified $[] -> $(()) 2010-02-02 15:21:51 +01:00
Harald Hoyer 5db587d7c1 init: fixed emergency_shell argument parsing 2010-01-20 16:04:55 +01:00
Luca Berra b5664d5d02 base: improve emergency shell
for some unknown reason the emergency shell
starts with stderr closed, at first I even tought it was not working at
all, then I came up with this hack, which seems to work properly. I also
change the prompt to remind which step are we breaking to.
2010-01-13 16:01:36 +01:00
Harald Hoyer 57c6b805ce rootfs-block/mount-root: remount root with /etc/fstab filesystem options 2009-11-26 19:12:10 +01:00
Harald Hoyer f2a716d47c base/init: make link /dev/fd, mount devpts,tmpfs with correct dev parm 2009-10-08 14:21:31 +02:00
Harald Hoyer ac36d5db7e base/init: kill loginit after one second of waiting 2009-10-07 16:09:20 +02:00
Harald Hoyer 8d0a55cfac do not use init= arg as first argument 2009-10-07 12:48:47 +02:00
Philippe Seewer 7a6e646c83 Move write-ifcfg to its own module
ifcfg config style is redhat specific, this should be in its own
module.
2009-10-06 15:23:52 +02:00
Philippe Seewer a71f1b4917 Add multinic test suite
This is a start a test suite for the multinic support of dracut
2009-10-06 15:17:39 +02:00
Harald Hoyer 4592b6983a base: add logger for rdinitdebug
initlog logs to /init.log /dev/kmsg and /dev/console
2009-10-01 18:11:24 +02:00
Harald Hoyer de439e24d7 base/init: stop udev exec queue before killing it 2009-10-01 15:17:59 +02:00
Harald Hoyer 52aeb3f312 base/dracut-lib: add setdebug
do not clutter rdinitdebug output with getarg and getargs debug
2009-10-01 14:46:16 +02:00
Harald Hoyer 0e0031dc61 init: start udevd with --resolve-names=never 2009-09-30 15:04:50 +02:00