|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: package/.../mkinitramfs/install/D%sbindir_mkinitramfs.sh |
|
|
|
# Copyright (C) 2007 - 2008 The OpenSDE Project |
|
|
|
# Copyright (C) 2007 - 2009 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -16,11 +16,12 @@ |
|
|
|
root= |
|
|
|
kernever= |
|
|
|
template= |
|
|
|
suffix= |
|
|
|
running= |
|
|
|
|
|
|
|
mkinitrd_usage() { |
|
|
|
cat <<EOT |
|
|
|
Usage: ${0##*/} [ -R <root> ] [ -T <template> ] [<kernelver>] |
|
|
|
Usage: ${0##*/} [ -R <root> ] [ -T <template> ] [ -s <suffix>] [<kernelver>] |
|
|
|
root.....: location of the sandbox to work in (default: /) |
|
|
|
template.: file to use as template for this image |
|
|
|
(default: \$root/boot/initrd.img) |
|
|
@ -33,6 +34,7 @@ while [ $# -gt 0 ]; do |
|
|
|
case "$1" in |
|
|
|
-R) root="$2"; shift ;; |
|
|
|
-T) template="$2"; shift ;; |
|
|
|
-s) suffix="$2"; shift ;; |
|
|
|
[0-9]*) kernelver="$1" ;; |
|
|
|
*) mkinitrd_usage; exit 1 ;; |
|
|
|
esac |
|
|
@ -128,7 +130,7 @@ if [ $? -eq 0 ]; then |
|
|
|
|
|
|
|
# repack if everything went well |
|
|
|
if [ $errno -eq 0 ]; then |
|
|
|
initrd=boot/initrd-$kernelver.img |
|
|
|
initrd="boot/initrd-${suffix:-$kernelver}.img" |
|
|
|
|
|
|
|
echo "Expanded size: $( du -sh . | cut -d' ' -f1 )" |
|
|
|
echo "Repacking '$tmpdir' into \$root/$initrd" |
|
|
|