diff options
author | Fabio Erculiani <lxnay@sabayon.org> | 2011-09-13 11:58:30 +0200 |
---|---|---|
committer | Fabio Erculiani <lxnay@sabayon.org> | 2011-09-13 11:58:30 +0200 |
commit | 1e50bd01d27fbc3c3be29753f59f6e9608a19312 (patch) | |
tree | 577649dd676218c0e63ff09480bf04dcb805c375 /gen_initramfs.sh | |
parent | dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug ... (diff) | |
download | genkernel-1e50bd01d27fbc3c3be29753f59f6e9608a19312.tar.gz genkernel-1e50bd01d27fbc3c3be29753f59f6e9608a19312.tar.bz2 genkernel-1e50bd01d27fbc3c3be29753f59f6e9608a19312.zip |
trivial: cleanup code, drop whitespaces and some more cruft
Diffstat (limited to 'gen_initramfs.sh')
-rwxr-xr-x | gen_initramfs.sh | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 50ddbe58..41c07a6a 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -25,7 +25,7 @@ append_base_layout() { echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initramfs-base-temp/etc/fstab echo "proc /proc proc defaults 0 0" >> ${TEMP}/initramfs-base-temp/etc/fstab - + cd ${TEMP}/initramfs-base-temp/dev mknod -m 660 console c 5 1 mknod -m 660 null c 1 3 @@ -61,7 +61,7 @@ append_busybox() { ln -s busybox ${TEMP}/initramfs-busybox-temp/bin/$i || gen_die "Busybox error: could not link ${i}!" done - + cd "${TEMP}/initramfs-busybox-temp/" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing busybox cpio" @@ -174,7 +174,7 @@ append_multipath(){ || gen_die "Could not copy file ${i} for MULTIPATH" done - if [ -x /sbin/multipath ] + if [ -x /sbin/multipath ] then cp /etc/multipath.conf "${TEMP}/initramfs-multipath-temp/etc/" || gen_die 'could not copy /etc/multipath.conf please check this' fi @@ -475,12 +475,12 @@ append_modules() { else cd / fi - + if [ -d "${TEMP}/initramfs-modules-${KV}-temp" ] then rm -r "${TEMP}/initramfs-modules-${KV}-temp/" fi - mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}" + mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}" for i in `gen_dep_list` do mymod=`find ./lib/modules/${KV} -name "${i}${MOD_EXT}" 2>/dev/null| head -n 1 ` @@ -489,11 +489,11 @@ append_modules() { print_warning 2 "Warning :: ${i}${MOD_EXT} not found; skipping..." continue; fi - + print_info 2 "initramfs: >> Copying ${i}${MOD_EXT}..." cp -ax --parents "${mymod}" "${TEMP}/initramfs-modules-${KV}-temp" done - + cp -ax --parents ./lib/modules/${KV}/modules* ${TEMP}/initramfs-modules-${KV}-temp 2>/dev/null mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/etc/modules" @@ -519,13 +519,13 @@ append_auxilary() { then rm -r "${TEMP}/initramfs-aux-temp/" fi - mkdir -p "${TEMP}/initramfs-aux-temp/etc" - mkdir -p "${TEMP}/initramfs-aux-temp/sbin" + mkdir -p "${TEMP}/initramfs-aux-temp/etc" + mkdir -p "${TEMP}/initramfs-aux-temp/sbin" if [ -f "${CMD_LINUXRC}" ] then cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC} to init" - else + else if isTrue ${NETBOOT} then cp "${GK_SHARE}/netboot/linuxrc.x" "${TEMP}/initramfs-aux-temp/init" @@ -546,12 +546,12 @@ append_auxilary() { # big cpio. cd ${TEMP}/initramfs-aux-temp ln -s init linuxrc -# ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc +# ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc if [ -f "${GK_SHARE}/arch/${ARCH}/initrd.scripts" ] then cp "${GK_SHARE}/arch/${ARCH}/initrd.scripts" "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" - else + else cp "${GK_SHARE}/defaults/initrd.scripts" "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" fi @@ -566,13 +566,13 @@ append_auxilary() { then sed -i "s:^REAL_ROOT=.*$:REAL_ROOT='${REAL_ROOT}':" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" fi - - echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" + + echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" for group_modules in ${!MODULES_*}; do group="$(echo $group_modules | cut -d_ -f2 | tr "[:upper:]" "[:lower:]")" echo -n "${group} " >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" done - echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" + echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" if [ -f "${GK_SHARE}/arch/${ARCH}/modprobe" ] then @@ -607,7 +607,7 @@ append_auxilary() { find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing auxilary cpio" cd "${TEMP}" - rm -r "${TEMP}/initramfs-aux-temp/" + rm -r "${TEMP}/initramfs-aux-temp/" } append_data() { |