Harald Hoyer
d125a47061
mkdir always with -m 0755
14 years ago
Harald Hoyer
79471f365e
base/dracut-lib.sh: changed kmgs log levels
...
New kernel/dmesg understands syslog levels, so we log with "+24" to indicate
that dracut is a daemon (current init).
14 years ago
Harald Hoyer
4ad453445a
base/dracut-lib.sh: relax getargbool value parsing
...
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
14 years ago
Harald Hoyer
9e7a3bf242
base/dracut-lib.sh: s/RDDEBUG/RD_DEBUG/g
...
RDDEBUG would be unset by the environment cleanup in init and logging
would be turned off afterwards.
14 years ago
Harald Hoyer
0b53ca70b6
Move all hooks to "$hookdir"
...
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
14 years ago
Harald Hoyer
535ad9d1fb
dracut-lib: improve die() logging
14 years ago
Harald Hoyer
8ce58f1f42
add missing shebang
14 years ago
Amadeusz Żołnowski
7a8a33b6cd
dracut-lib.sh: splitsep fix
14 years ago
Amadeusz Żołnowski
ccb0ab7348
99base/dracut-lib.sh: 5 new functions & 1 modified
...
New:
str_starts, str_replace
funiq - print new unique file name
mkuniqdir - create and print new unique dir
splitsep - splits given string 'str' with separator 'sep' into vars
udevmatch - create udev rule match for a device
Modified:
foreach_uuid_until - use $___ as a place holder
14 years ago
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
15 years ago
Harald Hoyer
cc02093d69
reformat source code
...
removed tabs and set indention to 4 spaces
added emacs and vi format headers
15 years ago
Harald Hoyer
3a4d0c9c14
dracut-lib.sh: fixed getarg for nonexistent parameters
...
getarg returned an old "$val" for nonexistent parameters, because "val"
was not local
15 years ago
Amadeusz Żołnowski
2926b5b35d
90crypt: keys on external devices support
...
99base/dracut-lib.sh: new fun.: getoptcomma, foreach_uuid_until
15 years ago
Harald Hoyer
adde3a7a27
dracut-lib.sh: getarg() returns the value of the last argument
...
a=0 a=1 a=2
$(getarg a) == "2"
15 years ago
Harald Hoyer
3a4989cae2
dracut-lib: export RDDEBUG
15 years ago
Harald Hoyer
b6a7c09070
chmod 0755 *.sh
15 years ago
Harald Hoyer
e54a84113e
get rid of rdnetdebug
...
set PS4 and output to /dev/initlog.pipe
15 years ago
Harald Hoyer
1d149cd039
dracut-lib: turn of shell debug mode in strstr and getarg(s)
15 years ago
Harald Hoyer
9232cab470
fix IFS restoring
15 years ago
Harald Hoyer
c98bcec89c
add preliminary IPv6 support
15 years ago
Harald Hoyer
4bb570c9a4
dracut-lib: do not leave debug mode in getarg and getargs
15 years ago
Harald Hoyer
2dfdcbf4e7
dracut-lib: read multiple lines from $init/etc/cmdline
15 years ago
Harald Hoyer
695de8493d
dracut-lib: prevent double log output
15 years ago
Harald Hoyer
b26260a0b9
dracut-lib: fixed wait_for_if_up()
16 years ago
Harald Hoyer
bf87d252f3
network: wait for interfaces to come up, before proceeding
16 years ago
Harald Hoyer
52aeb3f312
base/dracut-lib: add setdebug
...
do not clutter rdinitdebug output with getarg and getargs debug
16 years ago
Harald Hoyer
1dd5bc3fba
add udevproperty() to dracut-lib and use it
...
newer versions of udev use --property instead of --env
16 years ago
Harald Hoyer
54a73cbb2b
dracut-lib.sh: change -f to -e to allow symlinks
16 years ago
Harald Hoyer
82b2189d01
initqueue-finished: fail also on empty queue
16 years ago
Harald Hoyer
8238850caa
init: add initqueue-finished
...
/initqueue-finished/*.sh are scripts, which return != 0, if the main
loop still has pending jobs to do.
16 years ago
Harald Hoyer
273b197d75
added initqueue-settled and refactored code
16 years ago
Harald Hoyer
8ef0be5671
dracut-lib: try to set UDEVVERSION, if not set
16 years ago
Harald Hoyer
5c6a593f2e
add udevsettle function and settle after raid/lvm/crypto activities
16 years ago
Harald Hoyer
3d4641fd98
add rdinfo command line parameter
...
print informational output though "quiet" is set
16 years ago
Harald Hoyer
f72c10f657
getarg()/getargs(): check existance of /etc/cmdline before reading it
16 years ago
Harald Hoyer
c1a37d928f
dracut-lib: getarg(), getargs() read command line also from /etc/cmdline
...
Also honor parameters in /etc/cmdline.
getarg(): If the argument is first fround in /proc/cmdline, then it is
used
16 years ago
Harald Hoyer
0375106c78
add source_conf for static configuration variables
...
source_conf sources all *.conf files of a directory
init will now source all /etc/conf.d/*.conf files
16 years ago
Harald Hoyer
c0dc4c5d1e
dracut-lib: fixed quiet argument parsing
16 years ago
Harald Hoyer
532d7d9be4
dracut-lib: output warn() and die() to stderr
16 years ago
Harald Hoyer
1702e6c660
dracut-lib: if "quiet" is specified, do not print info() to console
16 years ago
Harald Hoyer
449adc611f
add info() and vinfo() to dracut-lib
...
- corrected the loglevel for warn()
- prepended with "dracut: " for kmesg to seperate from kernel messages
you can pipe to vinfo() for informational messages
16 years ago
Harald Hoyer
da1c03c8a0
dracut-lib add getargs()
...
getargs returns a space seperated list with all values found for a key
on the kernel command line
16 years ago
Harald Hoyer
b8f39ef152
renamed dracut-lib to dracut-lib.sh
16 years ago
Philippe Seewer
9f10836d63
Add warn() function to log warnings but not die()
16 years ago
Philippe Seewer
0fd1ab9d87
Log error messages to /dev/kmsg
...
When die()'ing inside scripts that are udev run, a simple echo isn't
good, udev usually swallows that. Routing messages to /dev/kmsg
ensures they appear on screen and in addition are easily saved through
dmesg.
16 years ago
Philippe Seewer
311a2769a0
Add 'die()' for easier error handling
...
Printing out an errormessage and quitting is easier if there's a function
to call. If the script calling die has exit trapped, like in init, the
emergency_shell is automatically called.
16 years ago
Seewer Philippe
07b2fbb183
Get rid of cat and grep
16 years ago
David Dillow
5103130352
nfsroot: move to netroot framework
...
Parse and convert commandline options in the cmdline hook, and
fill in the missing pieces in the netroot hook. This also allows
root=dhcp to work as expected.
16 years ago
David Dillow
ae5bc1fd8a
dracut-lib: add source_all to library
...
The network root handler will need this.
16 years ago
David Dillow
df44688f3e
lib: create a library for useful shell functions
...
There are several snippits of shell code that are useful to multiple
scripts. Start by moving getarg() into the library.
Signed-off-by: David Dillow <dave@thedillows.org>
16 years ago