pack-initrd: use -f to overwrite initrd

This commit is contained in:
Gilles Grandou 2011-05-03 23:57:35 +02:00
parent a51d2f237a
commit 075d1b38f0

View File

@ -1,6 +1,11 @@
#!/bin/sh
#
if [ "$1" = "-f" ]; then
forcewrite=yes
shift
fi
initrd=${1:-initrd.img}
ramdisk=${2:-ramdisk}
@ -9,7 +14,7 @@ if [ ! -d $ramdisk ]; then
exit 1
fi
if [ -f $initrd ]; then
if [ -f $initrd -a -z "$forcewrite" ]; then
echo "$initrd already exist."
exit 1
fi