opensuse:seifes-mkinitrd.git
7 years agosetup-block: map /dev/mmc* to the mmc_block driver openSUSE-11.2
Michal Marek [Thu, 11 Mar 2010 15:07:45 +0000 (16:07 +0100)]
setup-block: map /dev/mmc* to the mmc_block driver

References: bnc#480808
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoUpdate the URL in the specfile
Michal Marek [Wed, 17 Feb 2010 11:13:43 +0000 (12:13 +0100)]
Update the URL in the specfile

Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoscripts/setup-network.sh: change [ "$foo" ] to [ -n "$foo" ]
Michal Marek [Fri, 5 Feb 2010 15:23:21 +0000 (16:23 +0100)]
scripts/setup-network.sh: change [ "$foo" ] to [ -n "$foo" ]

References: bnc#471943
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoHandle low space below /dev/shm better
Michal Marek [Thu, 4 Feb 2010 21:29:05 +0000 (22:29 +0100)]
Handle low space below /dev/shm better

Pick first directory among $TMPDIR, /dev/shm, /tmp and /var/tmp that has
at least 50MB free space. If all have below 50MB, pick the one with most
free space and issue a warning. Also abort if creating the cpio image
fails.

References: bnc#553629
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agosbin/mkinitrd: Use $work_dir for all temporary files
Michal Marek [Thu, 4 Feb 2010 15:59:29 +0000 (16:59 +0100)]
sbin/mkinitrd: Use $work_dir for all temporary files

7 years agoAvoid using process substitution in setup scripts
Michal Marek [Thu, 4 Feb 2010 15:16:27 +0000 (16:16 +0100)]
Avoid using process substitution in setup scripts

References: bnc#575819
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoscripts/setup-modules.sh: fix for module options in /proc/cmdline
Michal Marek [Wed, 27 Jan 2010 14:00:23 +0000 (15:00 +0100)]
scripts/setup-modules.sh: fix for module options in /proc/cmdline

References: bnc#567868, bnc#574261
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoMake the build_rpm script suck less
Michal Marek [Tue, 26 Jan 2010 16:10:19 +0000 (17:10 +0100)]
Make the build_rpm script suck less

7 years agoUse ID_FS_LABEL_ENC instead of ID_FS_LABEL_SAFE in scripts/boot-storage.sh
Lars Müller [Fri, 15 Jan 2010 16:57:24 +0000 (17:57 +0100)]
Use ID_FS_LABEL_ENC instead of ID_FS_LABEL_SAFE in scripts/boot-storage.sh

References: bnc#483136
Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoscripts/setup-modules.sh: remove the check_builtin_module() hack
Michal Marek [Tue, 19 Jan 2010 11:06:24 +0000 (12:06 +0100)]
scripts/setup-modules.sh: remove the check_builtin_module() hack

Recent kernel and m-i-t handle it properly.

7 years agoDelete the archive/ directory
Michal Marek [Thu, 14 Jan 2010 14:34:43 +0000 (15:34 +0100)]
Delete the archive/ directory

It's useless and clutters git grep output.

Signed-off-by: Michal Marek <mmarek@suse.cz>
7 years agoDon't run fsck if on batteries
Milan Vancura [Tue, 15 Dec 2009 13:33:31 +0000 (14:33 +0100)]
Don't run fsck if on batteries

References: bnc#521419

7 years agoA spec file fixed
Milan Vancura [Mon, 14 Dec 2009 15:53:20 +0000 (16:53 +0100)]
A spec file fixed

7 years agoHBA firmware already handled by general firmware loading code
Milan Vancura [Mon, 14 Dec 2009 15:40:42 +0000 (16:40 +0100)]
HBA firmware already handled by general firmware loading code

No need to load HBA firmware separately as the general code in
commit 99a656 handles loading of every firmware.

7 years agoDon't limit inodes in /dev
Milan Vancura [Mon, 14 Dec 2009 13:28:54 +0000 (14:28 +0100)]
Don't limit inodes in /dev

References: bnc#529839

7 years agoStore git repo URL in the package metadata
Milan Vancura [Mon, 23 Nov 2009 14:11:01 +0000 (15:11 +0100)]
Store git repo URL in the package metadata

7 years agoiscsi_ibft module is not present on some architectures
Milan Vancura [Tue, 27 Oct 2009 15:52:15 +0000 (16:52 +0100)]
iscsi_ibft module is not present on some architectures

References: bnc#528657

7 years agoAllow root=LABEL= syntax but check the result
Milan Vancura [Tue, 27 Oct 2009 15:11:46 +0000 (16:11 +0100)]
Allow root=LABEL= syntax but check the result

Check the result of the $rootdev conversion

7 years agoAllow root=LABEL= syntax back again
Milan Vancura [Tue, 27 Oct 2009 14:02:37 +0000 (15:02 +0100)]
Allow root=LABEL= syntax back again

Fix commit a05c3884:
setup-storage.sh:resolve_device(): don't die so young!

References: bnc#483136

7 years agoadd any required firmware to the initrd
Milan Vancura [Thu, 22 Oct 2009 14:56:20 +0000 (16:56 +0200)]
add any required firmware to the initrd

Signed-Off-By: ro@suse.de
Signed-Off-By: mvancura@suse.cz
7 years agosbin/module_upgrade: adapt to new modprobe config layout
Michal Marek [Fri, 21 Aug 2009 14:27:43 +0000 (16:27 +0200)]
sbin/module_upgrade: adapt to new modprobe config layout

The shipped config file is updated by the module-init-tools package and
the local one moved to /etc/modprobe.d/99-local.conf.

References: bnc#532069

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agoscripts/setup-blockpartition.sh: fix partition->disk name convertion
Milan Vancura [Thu, 22 Oct 2009 12:42:49 +0000 (14:42 +0200)]
scripts/setup-blockpartition.sh: fix partition->disk name convertion

scripts/setup-blockpartition.sh: fix sed regexp converting a
partition device name to the disk name

References: bnc#531663

8 years agoFix scripts/boot-remount.sh syntax.
Milan Vancura [Wed, 21 Oct 2009 14:19:07 +0000 (16:19 +0200)]
Fix scripts/boot-remount.sh syntax.

8 years agoBe silent if /etc/scsi_id.config does not exist
Milan Vancura [Wed, 21 Oct 2009 14:17:54 +0000 (16:17 +0200)]
Be silent if /etc/scsi_id.config does not exist

References: bnc#544298

8 years agoreport the right exit_codeif update-bootloader was called
Milan Vancura [Tue, 13 Oct 2009 13:54:08 +0000 (15:54 +0200)]
report the right exit_codeif update-bootloader was called

References: bnc#531252

8 years agoProvide kernel version to modinfo
Milan Vancura [Tue, 13 Oct 2009 08:12:44 +0000 (10:12 +0200)]
Provide kernel version to modinfo

In case running kernel and kernel initrd is being build for are different
modinfo got wrong information about modules.

References: bnc#494364

Signed-off-by: Milan Vancura <mvancura@suse.cz>
8 years agoA spec file synchronized with the one from Build Service
Milan Vancura [Thu, 17 Sep 2009 11:43:53 +0000 (13:43 +0200)]
A spec file synchronized with the one from Build Service

8 years agomkinitrd.changes updated
Milan Vancura [Thu, 17 Sep 2009 11:32:36 +0000 (13:32 +0200)]
mkinitrd.changes updated

8 years agoboot-clock.sh: Use bash builtin touch
Milan Vancura [Thu, 17 Sep 2009 11:30:07 +0000 (13:30 +0200)]
boot-clock.sh: Use bash builtin touch

8 years agoEnable quota mount option for root partition
Michal Seben [Fri, 11 Sep 2009 15:32:14 +0000 (17:32 +0200)]
Enable quota mount option for root partition

Reference: bnc#532701 (related to bnc#430975)

Signed-off-by: Milan Vancura <mvancura@suse.cz>
8 years agoNote that we adjusted clock
Milan Vancura [Mon, 31 Aug 2009 12:56:21 +0000 (14:56 +0200)]
Note that we adjusted clock

Signed-off-by: Werner Fink <werner@suse.de>
8 years agoDo not copy module parameters from /proc/cmdline
Michal Marek [Tue, 11 Aug 2009 10:17:16 +0000 (12:17 +0200)]
Do not copy module parameters from /proc/cmdline

modprobe does it itself.

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agorename the temporary file /etc/modprobe.d/options to options.conf
Michal Marek [Tue, 11 Aug 2009 10:17:15 +0000 (12:17 +0200)]
rename the temporary file /etc/modprobe.d/options to options.conf

Required by new module-init-tools.

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agoFix the VERSION string
Milan Vancura [Tue, 4 Aug 2009 14:26:21 +0000 (16:26 +0200)]
Fix the VERSION string

Fix the VERSION variable in sbin/mkinitrd and set Version tag in spec file back
to "@@VERSION@@" what is replaced with VERSION from sbin/mkinitrd by build_rpm
script.

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agoDo not warn about built-in modules
Michal Marek [Tue, 4 Aug 2009 09:57:58 +0000 (11:57 +0200)]
Do not warn about built-in modules

Newer modprobe will print "builtin <module>" if a module is built-in,
do not treat this as an error. Also, prefix modprobe errors with
"modprobe:" (less scary than "FATAL:").

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agoAdd files missing in commit 4972cff to the repository
Michal Marek [Tue, 4 Aug 2009 12:04:30 +0000 (14:04 +0200)]
Add files missing in commit 4972cff to the repository

These files were missing in commit 4972cff:
scripts/boot-clock.sh
scripts/boot-rtc.sh
scripts/setup-clock.sh
src/warpclock.c

Signed-off-by: Michal Marek <mmarek@suse.cz>
8 years agoUpdate version to 2.5.10
Hannes Reinecke [Thu, 2 Jul 2009 06:53:45 +0000 (08:53 +0200)]
Update version to 2.5.10

Signed-off-by: Hannes Reinecke <hare@suse.de>
8 years agoUpdate changelog
Hannes Reinecke [Thu, 2 Jul 2009 06:51:16 +0000 (08:51 +0200)]
Update changelog

8 years agoSpec file fixes
Hannes Reinecke [Thu, 2 Jul 2009 06:41:35 +0000 (08:41 +0200)]
Spec file fixes

Make sure to only reference *.sh files in the scripts/ directory.

Signed-off-by: Thomas Biege <thomas@novell.com>
8 years agoMounting /root/proc for SELinux
Hannes Reinecke [Thu, 2 Jul 2009 06:38:08 +0000 (08:38 +0200)]
Mounting /root/proc for SELinux

References: bnc#457984

Signed-off-by: Thomas Biege <thomas@novell.com>
8 years agoSilence warnings about non-existing modprobe.conf
Hannes Reinecke [Thu, 2 Jul 2009 06:35:55 +0000 (08:35 +0200)]
Silence warnings about non-existing modprobe.conf

There is no need for modprobe.conf to actually exist,
so we shouldn't emit a warning here, too.

Signed-off-by: Ruediger Oertel <ro@suse.de>
8 years agoScript cleanup
Hannes Reinecke [Thu, 2 Jul 2009 06:34:18 +0000 (08:34 +0200)]
Script cleanup

- sed is powerfull, use it instead using several pipes
- use usleep for waiting on events
- use the settimeofday feature to warp the system clock for
  systems which use the localtime in the UTC
- add scripts from aaa_base for loading rtc module and warp
  the clock for systems with local time in RTC

Signed-off-by: Werner Fink <werner@suse.de>
8 years agoInclude firmware loading rules
Hannes Reinecke [Thu, 2 Jul 2009 06:29:18 +0000 (08:29 +0200)]
Include firmware loading rules

Udev now keeps the firmware loading rules in a separate ruleset.
Include it, too.

References: bnc#494199

Signed-off-by: Hannes Reinecke <hare@suse.de>
8 years agonew udev will need /sbin/blkid in initramfs (bnc#513994)
Milan Vancura [Tue, 23 Jun 2009 08:59:10 +0000 (10:59 +0200)]
new udev will need /sbin/blkid in initramfs (bnc#513994)

8 years agoUpdate changelog and bump version to 2.5.9
Bernhard Walle [Mon, 9 Feb 2009 08:58:03 +0000 (09:58 +0100)]
Update changelog and bump version to 2.5.9

8 years agoAlso honor TMPDIR environment when /dev/shm is writable
Bernhard Walle [Mon, 9 Feb 2009 08:57:12 +0000 (09:57 +0100)]
Also honor TMPDIR environment when /dev/shm is writable

Implement as specified in the manual page.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate changelog and bump version to 2.5.8
Bernhard Walle [Fri, 6 Feb 2009 14:14:14 +0000 (15:14 +0100)]
Update changelog and bump version to 2.5.8

8 years agoRemote the -t parameter and use /tmp as user
Bernhard Walle [Fri, 6 Feb 2009 14:11:35 +0000 (15:11 +0100)]
Remote the -t parameter and use /tmp as user

Remove the -t (temporary directory) parameter because we need also a
temporary directory for parameter parsing. So it doesn't make sense.

Instead, use the TMPDIR environment. If unset, default to /dev/shm
when writable (as root) and to /tmp otherwise (as user).

This fixes /sbin/mkinitrd -h as user.

References: bnc #471953
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate version to 2.5.7
Bernhard Walle [Thu, 5 Feb 2009 20:09:46 +0000 (21:09 +0100)]
Update version to 2.5.7

8 years agoUpdate Changelog
Bernhard Walle [Thu, 5 Feb 2009 20:08:18 +0000 (21:08 +0100)]
Update Changelog

8 years agoRequire libxslt (for xsltproc) in mkinitrd.spec
Bernhard Walle [Thu, 5 Feb 2009 20:07:10 +0000 (21:07 +0100)]
Require libxslt (for xsltproc) in mkinitrd.spec

Because of some changes in SUSE BuildRequires we have to require that to
generate the manual page.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate changelog and version
Bernhard Walle [Thu, 29 Jan 2009 15:42:34 +0000 (16:42 +0100)]
Update changelog and version

8 years agoDon't use the 'ip' variable from environment
Bernhard Walle [Thu, 29 Jan 2009 15:39:11 +0000 (16:39 +0100)]
Don't use the 'ip' variable from environment

Because YaST/Linuxrc exports 'ip', that can lead to false results. Don't
honor the 'ip' environment.

References: bnc #450680
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate version and mkinitrd.changes
Bernhard Walle [Fri, 23 Jan 2009 10:31:30 +0000 (11:31 +0100)]
Update version and mkinitrd.changes

8 years agoFix detection of compiled-in modules
Bernhard Walle [Fri, 23 Jan 2009 10:24:13 +0000 (11:24 +0100)]
Fix detection of compiled-in modules

The detection of compiled-in modules didn't work properly in all cases.
The 'foo REQUIRES bla' syntax in the modprobe configuration files
were not catched.

That compiled-in modules checking is needed for PPC64 because their
kernel configuration contains compiled-in stuff (mostly USB) that other
architectures have as module in the default SUSE configuration. However,
it may also be useful on other architectures for self-compiled kernels.

References: bnc #449123
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate version and mkinitrd.changes
Bernhard Walle [Thu, 22 Jan 2009 15:32:17 +0000 (16:32 +0100)]
Update version and mkinitrd.changes

8 years agoReindent
Bernhard Walle [Thu, 22 Jan 2009 15:27:40 +0000 (16:27 +0100)]
Reindent

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoResolve hostnames in /etc/hosts
Bernhard Walle [Thu, 22 Jan 2009 15:21:22 +0000 (16:21 +0100)]
Resolve hostnames in /etc/hosts

To be able to use also hostnames in initrd which are not resolvable via DNS but
have been defined locally in /etc/hosts, we copy over the current /etc/hosts
into the initrd and change the /etc/nsswitch.conf.

References: bnc #468090
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate mkinitrd.changes and bump version
Bernhard Walle [Wed, 21 Jan 2009 19:33:43 +0000 (20:33 +0100)]
Update mkinitrd.changes and bump version

8 years agoRemove 'alpha' case
Bernhard Walle [Wed, 21 Jan 2009 19:32:35 +0000 (20:32 +0100)]
Remove 'alpha' case

Don't claim to support something we never tested since ages.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoInclude libunwind on IA64
Bernhard Walle [Wed, 21 Jan 2009 19:30:27 +0000 (20:30 +0100)]
Include libunwind on IA64

Because libgcc_s on IA64 (that is explicitly included) requires
libunwind on IA64, we also include that. This fixes the error

  libgcc_s.so.1 must be installed for pthread_cancel to work

that is shown during bootup.

References: bnc #459218
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate version and mkinitrd.changes
Bernhard Walle [Tue, 20 Jan 2009 18:24:40 +0000 (19:24 +0100)]
Update version and mkinitrd.changes

8 years agoUse vmlinuz on x86
Bernhard Walle [Tue, 20 Jan 2009 18:23:43 +0000 (19:23 +0100)]
Use vmlinuz on x86

On x86 (i386/x86_64) the shell glob to find the default kernel was
'vmlinu.', so both 'vmlinux' and 'vmlinuz' did match. Because 'x' is
before 'z', if we have the same file as 'vmlinux' and 'vmlinuz', the
match was 'vmlinux'.

However, we use the bzImage (vmlinuz) for booting on x86, so it doesn't
make sense to match for vmlinux (the ELF image which cannot be used to
boot the system with GRUB/LILO).

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate version and mkinitrd.changes
Bernhard Walle [Tue, 20 Jan 2009 14:31:14 +0000 (15:31 +0100)]
Update version and mkinitrd.changes

8 years agoAlso include the symlink, not only the target
Bernhard Walle [Tue, 20 Jan 2009 14:27:12 +0000 (15:27 +0100)]
Also include the symlink, not only the target

Copy also the symbolic link to initrd, not only the link target. However,
copy the link first so that in cases when link and targets are the same
the target wins over the link.

Example: /sbin and /usr/sbin are both copied to /sbin in initrd.

References: bnc #467531

8 years agoUse the mount options of the root file system from /etc/fstab
Bernhard Walle [Mon, 19 Jan 2009 16:31:20 +0000 (17:31 +0100)]
Use the mount options of the root file system from /etc/fstab

Use the mount options of the root file system from /etc/fstab when building the
initrd and save it in the initrd image as "rootfsopts". That setting can still
be overwritten by the "rootflags" boot parameter.

References: bnc #449369
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoFix symlink detection
Bernhard Walle [Wed, 14 Jan 2009 16:11:48 +0000 (17:11 +0100)]
Fix symlink detection

The 2nd copy prevented the symlink resolution from doing anything. Also improve
the error handling and fix some indentation.

References: bnc #431714
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoRemove changelog entries from spec file
Bernhard Walle [Tue, 13 Jan 2009 13:32:09 +0000 (14:32 +0100)]
Remove changelog entries from spec file

They are auto-generated.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoCopy the system resolv.conf for static IP configurations
Bernhard Walle [Tue, 13 Jan 2009 13:30:40 +0000 (14:30 +0100)]
Copy the system resolv.conf for static IP configurations

Copy the system resolv.conf for static IP configurations
to make name resolution work in the kdump case when static
IPs are used.

References: bnc #459065
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoImprove documentation of -R option in mkinitrd(8)
Bernhard Walle [Tue, 13 Jan 2009 13:01:24 +0000 (14:01 +0100)]
Improve documentation of -R option in mkinitrd(8)

Subject says all. Just mention what that '-R' stands for.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoAdd the option -R to scripts/setup-prepare.sh
Bernhard Walle [Tue, 13 Jan 2009 13:00:05 +0000 (14:00 +0100)]
Add the option -R to scripts/setup-prepare.sh

I forgot to commit that change. It's needed so that getopt gets the right
list of available parameters and -R now really works.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoGet the version in build_rpm from the source file, not from the spec file
Bernhard Walle [Tue, 13 Jan 2009 12:55:01 +0000 (13:55 +0100)]
Get the version in build_rpm from the source file, not from the spec file

Because the spec file has now @@VERSION@@ in the 'Version:' field, that doesn't
work any longer.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoAdd version handling
Bernhard Walle [Tue, 13 Jan 2009 12:48:39 +0000 (13:48 +0100)]
Add version handling

Add a -R (release) option to print the version. The plan is to increment
the release on every package submission and tag git when versions are released.
That way the RPM package version can be used to show the release of mkinitrd.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoFix lsinitrd -c option when -c is not specified
Bernhard Walle [Tue, 13 Jan 2009 12:33:17 +0000 (13:33 +0100)]
Fix lsinitrd -c option when -c is not specified

Because in that case the $config variable is not defined we got a syntax
error. Fix that.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoImplement -c option in lsinitrd(8)
Bernhard Walle [Mon, 12 Jan 2009 15:56:36 +0000 (16:56 +0100)]
Implement -c option in lsinitrd(8)

Shows the configuration (config/*) files of the built initrd. Quite nice for
debugging.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoImplement bonding for network interfaces
Bernhard Walle [Mon, 12 Jan 2009 15:53:45 +0000 (16:53 +0100)]
Implement bonding for network interfaces

This is a first attemt to implement bonding. The patch is basically from
Tanvi Verma <tanvi@netapp.com> with some additions. It should work with
iSCSI. Known problems: Network setup (rcnetwork start) seems to re-condigure
and break stuff.

References: bnc #460720
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoExplicitely require 'sd_mod' when adding all libata modules
Bernhard Walle [Mon, 12 Jan 2009 13:09:19 +0000 (14:09 +0100)]
Explicitely require 'sd_mod' when adding all libata modules

No module has 'sd_mod' as dependency. Therefore we need to require 'sd_mod'
explicitely. Because the code path that adds all libata modules doesn't add the
result from the get_devmodule function, we need to code that a 2nd time.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoUpdate Changelog
Bernhard Walle [Thu, 8 Jan 2009 17:17:07 +0000 (18:17 +0100)]
Update Changelog

8 years agoFix handling of minor/major device numbers for minor device numbers > 255
Bernhard Walle [Thu, 8 Jan 2009 17:09:31 +0000 (18:09 +0100)]
Fix handling of minor/major device numbers for minor device numbers > 255

New kernels may use minor device numbers larger than 255 for storage. One can
enable that for debugging with CONFIG_DEBUG_BLOCK_EXT_DEVT set in the kernel
configuration.

That patch changes the handling of minor/major device numbers in a way
that the first 20 bits are used for the minor number and the rest for the
major number. That's what the kernel currently does, so we're on the safe
side.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoFix libata detection fix
Bernhard Walle [Thu, 8 Jan 2009 16:55:53 +0000 (17:55 +0100)]
Fix libata detection fix

The commit 773b9b9568fc6b3689c73f4606d16f816383da60 introduced a problem
that get_devmodule didn't update the 2nd parameter correctly. That patch
fixes the problem.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoImplement dead symlink detection
Bernhard Walle [Thu, 8 Jan 2009 10:08:05 +0000 (11:08 +0100)]
Implement dead symlink detection

If we're copying a symlink, always copy the target, too.

References: bnc #431714
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoFix libata detection
Bernhard Walle [Wed, 7 Jan 2009 17:25:20 +0000 (18:25 +0100)]
Fix libata detection

Now by default all libata drivers are included if a disk is detected as libata.
One could use the -S option to disable that behaviour.

That was already implemented, but didn't work. The problem was that a global
variable called block_uses_libata was set, but the function that sets that
variable was called in a subshell like

    bla=$(handle_scsi ..)

To solve the problem we now don't use a subshell but use indirect variable
references to get the result (see http://tldp.org/LDP/abs/html/complexfunct.html
and the example 23-5 to get a documentation how that indirect variable
references are used in bash).

Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoIndentation fix
Bernhard Walle [Wed, 7 Jan 2009 15:20:54 +0000 (16:20 +0100)]
Indentation fix

8 years agoRemove trailing whitespace
Bernhard Walle [Wed, 7 Jan 2009 15:19:02 +0000 (16:19 +0100)]
Remove trailing whitespace

8 years agoMount /root/proc in initrd to make SELinux happy
Bernhard Walle [Wed, 7 Jan 2009 12:34:47 +0000 (13:34 +0100)]
Mount /root/proc in initrd to make SELinux happy

To make the selinux patch in sysvinit work we have to mount at least
/proc before init is started. mount --move does not work.

References: bnc #457984
Signed-off-by: Thomas Biege <thomas@suse.de>
Signed-off-by: Bernhard Walle <bwalle@suse.de>
8 years agoRevert mounting of /proc in initrd
Bernhard Walle [Tue, 16 Dec 2008 09:15:32 +0000 (10:15 +0100)]
Revert mounting of /proc in initrd

Because the patch 0984a1badcc3485846ea96a827c0e3d2e1dca389 assumed that
the libc of initrd can execute binaries (the root/bin/chroot) in the
running system, which is not necessarily true on PPC, this patch will
be reverted for now.

References: bnc #457984
Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoFix detection if the log directory is writable
Bernhard Walle [Sun, 14 Dec 2008 17:49:23 +0000 (18:49 +0100)]
Fix detection if the log directory is writable

The last commit contained a small bug that LOGFILE was checked for being
a directory. That cannot be true. Therefore introduce LOGFILE.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoImplement logging
Bernhard Walle [Sun, 14 Dec 2008 17:46:04 +0000 (18:46 +0100)]
Implement logging

To increase debugging, log now to /var/log/YaST2/mkinitrd.log.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoGenerate manual pages using asciidoc
Bernhard Walle [Thu, 11 Dec 2008 11:12:30 +0000 (12:12 +0100)]
Generate manual pages using asciidoc

Instead of writing the manual pages in nroff directly, use asciidoc(1)
to generate them. The asciidoc format is more readable than nroff
(at least in my very personal opinion).

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoDon't output nroff formatted help when stdout is not a Terminal
Bernhard Walle [Wed, 10 Dec 2008 16:38:33 +0000 (17:38 +0100)]
Don't output nroff formatted help when stdout is not a Terminal

Check if stdout is a Terminal. If not, don't output control characters.
Improve the fallback formatting a bit.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoUse the right mkinitrd.{spec,changes} if build_rpm -b $BRANCH is used
Bernhard Walle [Wed, 10 Dec 2008 15:38:33 +0000 (16:38 +0100)]
Use the right mkinitrd.{spec,changes} if build_rpm -b $BRANCH is used

Don't just copy mkinitrd.{spec,changes} from the current working copy
to /tmp/mkinitrd, but use 'git show branch:file' to get the latest contents
from the repo.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoDon't build initrds for the kdump kernel when calling mkinitrd without arguments
Bernhard Walle [Wed, 10 Dec 2008 15:30:17 +0000 (16:30 +0100)]
Don't build initrds for the kdump kernel when calling mkinitrd without arguments

The kdump initrd is built with mkdumprd(8), not directly with mkinitrd(8).
mkdumprd(8) calls mkinitrd(8) with special options. Therefore, we don't
(re-)build the kdump initrd with mkinitrd calls that don't specify kernel
and initrd. 'rckdump start' does that on demand.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoMount /root/proc in initrd to make SELinux happy
Bernhard Walle [Wed, 10 Dec 2008 15:16:32 +0000 (16:16 +0100)]
Mount /root/proc in initrd to make SELinux happy

To make the selinux patch in sysvinit work we have to mount at least
/proc before init is started. mount --move does not work.

References: bnc #457984
Signed-off-by: Thomas Biege <thomas@suse.de>
Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoFix exclusion of firmware modules from INITRD_MODULES
Bernhard Walle [Wed, 10 Dec 2008 09:31:34 +0000 (10:31 +0100)]
Fix exclusion of firmware modules from INITRD_MODULES

Commit 4b0eb6f67d6c8e258cf27efa90c5d466c88f5e08 introduced the problem that now
modules that require a firmware are not included into initrd at all if only
listed via INITRD_MODULES and not detected automatically. Now we include such
modules via the %udevmodules comment but don't load it manually with 'modprobe'
at system boot (i.e., via. %modules). That should work for that case.

References: bnc #457428
Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoFix multipath detection via dm-multipath module
Bernhard Walle [Tue, 9 Dec 2008 15:51:33 +0000 (16:51 +0100)]
Fix multipath detection via dm-multipath module

The code in setup-start.sh to detect dm-multipath feature could have never
worked.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoDon't load drivers via modprobe that require firmware
Bernhard Walle [Tue, 9 Dec 2008 15:43:51 +0000 (16:43 +0100)]
Don't load drivers via modprobe that require firmware

Drivers listed in INITRD_MODULES in /etc/sysconfig/kernel are loaded before
udev is started via modprobe. However, udev is required to load firmware files.
The fix is to exclude drivers that require firmware files from being loaded
via INITRD_MODULES. The resolution is done when creating the initrd, not at boot
time.

References: bnc #457428
Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoCheck for some modules if they are compiled-in
Bernhard Walle [Mon, 8 Dec 2008 16:27:37 +0000 (17:27 +0100)]
Check for some modules if they are compiled-in

For specific modules (in our case: usbcore, ohci_hcd, ehci_hcd and usbhid)
check if they are compiled in by grepping the /boot/config-$KERNELVERSION.
That removes warnings for PPC64.

References: bnc #449123
Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoExtend the 'SUSE INITRD' comment mechanism for programs
Bernhard Walle [Mon, 8 Dec 2008 15:23:53 +0000 (16:23 +0100)]
Extend the 'SUSE INITRD' comment mechanism for programs

For 'install' lines in /etc/modprobe.conf and friends you need to have
the binaries in the initrd so that the install lines don't fail. Add
parsing of

        # SUSE INITRD: foo REQUIRES /path/to/program

comments to the mkinitrd script.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoActually execute load_additional_dependencies
Bernhard Walle [Mon, 8 Dec 2008 15:11:59 +0000 (16:11 +0100)]
Actually execute load_additional_dependencies

Commit 9e82cd561d229469395b8f46e0322ba9ba24fb0d broke the execution of
load_additional_dependencies because we checked if the global
additional_module_dependencies array contained data. Because that commit
pre-filled additional_module_dependencies with data, the function was
never executed.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
9 years agoUpdate Changelog.
Bernhard Walle [Sat, 6 Dec 2008 16:21:40 +0000 (17:21 +0100)]
Update Changelog.