summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-25init: declare PATH, remove absolute pathsDave Reisner7-33/+35
We were never very consistent about this anyways. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25functions: remove get_module_nameDave Reisner1-8/+0
This is no longer used, as all of our module discovery functions will return clean module names. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25install/base: cleanup and simplifyDave Reisner2-23/+13
* Create only the directories that are necessary. If others are needed, they'll be created along the way. As part of this, we create /new_root sooner in init, so it's less jarring to the user if they request a break. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-25remove support for -m to add a startup messageDave Reisner4-16/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: declare usage as a heredocDave Reisner1-18/+22
alphabetize the usage while we're at it
2011-06-19install/keymap: refactor and bashifyDave Reisner1-23/+16
Write directly to the build root rather than creating temp files to be added later on. Also cleanup syntax to Bash standards. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19add -t option to specify alternate build directoryDave Reisner3-16/+31
This requires some refactoring of how we handle TMPDIR declaration and creation, as well as protecting the way we do cleanup so that we don't error out when cleanup is called prior to TMPDIR being declared. We also add a shortcut to the build root based on the TMPDIR for convenience. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: bashification, part 2/2Dave Reisner1-8/+7
mostly consists of syntax changes in the hook parsing loop. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19mkinitcpio: bashification, part 1/2Dave Reisner3-16/+15
Always use bash's [[ ]], and apply (( )) where arithmetic calculations are made. We also take a few other bash shortcuts to simplify code where possible. We also touch the Makefile here to adjust the sed'ing for directory names. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19functions: simplify parse_hookDave Reisner1-16/+9
Since we intentionally word split these variables, a variable containing only white space will never trigger us to iterate on each for loop. Therefore, the existance check is superfluous as it will always pass. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19functions: refactor add_symlinkDave Reisner1-11/+6
We don't need to add the destination directory -- we can assume this will always be added by another function. We also ignore $BASEDIR as we will never be passing in a path that contains a $BASEDIR so we don't want to erroenous trim a path. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19overhaul output, introducing colorDave Reisner4-73/+100
Output style and coloring is borrowed from makepkg with minor adjustments. Most instances where we encounter fatal errors are replaced with a 'die' function to wrap this up neatly. In addition, we introduce the -n flag, for no-color. As a side effect, we need to source the functions file earlier so we have the output functions available earlier. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: remove cruft in getopts loopDave Reisner1-6/+0
We shouldn't guess at what the user does and doesn't want, but rather verify after parsing that what we have is sane. Also, remove the default case label, as this will never be met. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16declare SAVELIST, QUIET, SHOW_AUTOMODS as faux booleansDave Reisner2-10/+9
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: refactor and bashify early path calculationsDave Reisner1-26/+27
This addresses a few issues with creation of images with a $BASEDIR, the most alarming that images would always be created on the real root filesystem, with no regard for any supplied base directory. This also cleans up some repetitive path declaration wrt BASEDIR and MODULEDIR. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16declare all variables in mkinitcpioDave Reisner2-25/+15
We also consolidate our empty variable declarations in mkinitcpio with a simple declare. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16use consistent vim modelinesDave Reisner4-1/+9
This also adds a /bin/bash shebang to functions. While not technically necessary, this ensures that vim gives us the correct syntax highlight file. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: bashify preset build loopDave Reisner1-29/+26
This mainly consists of removing all traces of eval and building the options into an array instead a simple variable. We also make sure that the SCRIPT var is unset, as it may be populated during hook processing. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16Makefile: refactor and simplifyDave Reisner1-52/+42
This should all lead to easier maintenance. * use git-archive to create the tarball, appending DIST_EXTRA to the tarball afterwards. * use commonly defined variables such as ${RM} * always use install, rather than cp to ensure proper permissions * functionize creation of directories * add .PHONY targets * combined commands wherever possible Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16lsinitcpio: new utility to dump contents of imagesDave Reisner2-0/+143
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: allow specifying kernel ver as path to imageDave Reisner2-2/+29
update the example.preset to show this syntax as an alternative Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: use simple PEs instead of externalsDave Reisner1-4/+4
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio.conf: note implicit support for lzopDave Reisner1-0/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: document hook APIDave Reisner1-32/+59
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: refactor add_fileDave Reisner1-22/+15
Properly detect symlinks using the -L shell test, resolving and recursing on discovery. This results in removing a lot of extraneous variable declarations and code. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16use bsdcpio to create imagesDave Reisner3-64/+58
This is a departure from using gen_init_cpio, which proved to be a huge bottleneck in performance. Tests for existance change from being a call to grep, to a simple shell test. In the process, we have to modify the behavior of the -s option, and we lose the -a option. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: remove add_symlink2Dave Reisner1-10/+0
This is never used by anything in the official repos. Kill it with fire. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: remove add_deviceDave Reisner2-22/+0
This was only ever used in the base layout, and it's not needed. devices will be present if we're using devtmpfs, and created for us by init if we mount on tmpfs. Also, this is part of our move towards using bsdcpio instead of gen_init_cpio, and as a side effect we can no longer support this. Any devices that need to be created should be done so by the runtime hooks, not the install time hooks. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: refactor add_moduleDave Reisner2-32/+34
Simplify and fix a few bugs in the process. We rely solely on modinfo for obtaining information about module location, dependencies and firmware. Add a small wrapper function for modinfo that will always specify our $BASEDIR and $KERNELVERSION for us. Also, kill off HAS_MODULES. Since we have ADDED_MODULES, which contains all currently added modules, we can count the elements in this when it comes time to decide to create depmod files. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16functions: cleanup and refactor add_binaryDave Reisner1-33/+19
Modify the sed filter to remove PIC addresses and ignore the first line which will always be the vdso. Also remove the tls filter, as glibc has had threaded support mainlined for many years now. If a user has a glibc this old, we don't have support for them elsewhere (udev, kernel). We also cleanup the logical flow through this function and remove a lot of cruft that would always return true, or that didn't quite make sense. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16dmesg: remove install/hookDave Reisner2-24/+0
This should be set via the loglevel= parameter on the kernel cmdline. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: deprecate install() in install hooksDave Reisner22-31/+38
This is an unfortunate name clash with a common utility and should be avoided. Rename the install function to 'build' and warn the user when we discover a hook using an 'install' function. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio.conf: s/raid/mdadm/Dave Reisner1-3/+3
'raid' is the old deprecated hook name, which no longer exists. mdadm is the proper name. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16init: don't attempt modprobe if $MODULES is emptyDave Reisner1-1/+1
This is harmless when it fails, but it might alarm users. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16Release version 0.6.150.6.15Thomas Bächler1-1/+1
2011-06-16mkinitcpio: Unset GREP_OPTIONS to avoid broken imagesThomas Bächler1-0/+3
2011-06-16Fix detection of not compressed modulesSebastien Luttringer1-1/+1
Function all_modules() doesn't correctly detect module extension. It's a one char removing patch. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-12Release version 0.6.140.6.14Thomas Bächler1-1/+1
2011-06-07default_mount_handler: Only try to manually create the root device if ↵Thomas Bächler2-1/+3
devtmpfs is not used.
2011-06-07init: purge environment before leaving early userspaceDave Reisner1-1/+1
We preserve TERM, but everything else can be destroyed from the environment. Without preserving TERM, the value is reset to 'dumb' in userspace, and we get false readings by the initscripts on terminal capabilities. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07init_functions: simplify mount case of root=/dev/*Dave Reisner1-9/+5
/sys/class/block contains all of our block devices, including the partitions of each parent block device, so directly check for the existance of the dev file rather than looping. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07init_functions: support {LABEL,UUID}= syntaxDave Reisner1-0/+9
use blkid to resolve a tag name to a block device. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07init: load all earlymodules at onceDave Reisner1-3/+1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07init: remove support for disablemodulesDave Reisner1-13/+1
This is no longer supported, as m-i-t supports modprobe.blacklist= syntax on the kernel cmdline. We load all modules from the config at once with --all and --use-blacklist flags in order to honor the cmdline blacklisting. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07mkinitcpio: use binary hashed depmod filesDave Reisner1-3/+3
We can condense this logic into a loop as well, which cuts back on repetative code. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07functions: refactor checked modulesDave Reisner1-8/+3
Do a single grep to compare the contents of the module file (if exists) against the results of all_modules for the provided arguments. If there's no module file, this is still just pass through to all_modules. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-07functions: refactor all_modulesDave Reisner1-4/+8
sanitize and print during module discovery. We also strip path names during this process and null terminate path names for safety. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-06functions: refactor auto_modulesDave Reisner1-9/+6
sort/uniq the modaliases files' contents, before passing _all_ of them to modprobe -a. This cuts back on execution time as well as cleaning up the resulting list of modules. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-02Release version 0.6.130.6.13Thomas Bächler1-1/+1
2011-06-02Remove load-modules.sh. Requires the udev 171-2 package.Thomas Bächler3-59/+0