summaryrefslogtreecommitdiff
path: root/sys-boot/elilo/files/elilo.sh-chkspace.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/elilo/files/elilo.sh-chkspace.patch')
-rw-r--r--sys-boot/elilo/files/elilo.sh-chkspace.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-boot/elilo/files/elilo.sh-chkspace.patch b/sys-boot/elilo/files/elilo.sh-chkspace.patch
new file mode 100644
index 000000000000..710780e8da6c
--- /dev/null
+++ b/sys-boot/elilo/files/elilo.sh-chkspace.patch
@@ -0,0 +1,15 @@
+Don't count duplicate files twice when summing bytesneeded
+
+--- elilo/debian/elilo.sh.chkspace 2006-03-16 07:53:00.000000000 -0500
++++ elilo/debian/elilo.sh 2006-03-16 07:53:27.000000000 -0500
+@@ -580,7 +580,9 @@
+ sed 's/.*=[[:space:]]*//' | grep -v ':'`
+ vmmfiles=`grep '^[[:space:]]*vmm[[:space:]]*=' $bootconf | \
+ sed 's/.*=[[:space:]]*//' | grep -v ':'`
+- bytesneeded=`cat $imagefiles $initrdfiles $vmmfiles 2>/dev/null | wc -c`
++ allfiles=`for f in $imagefiles $initrdfiles $install $bootconf; do \
++ echo $f; done | sort -u`
++ bytesneeded=`cat $allfiles 2>/dev/null | wc -c`
+ # convert to KB, allowing 5% overhead
+ kbneeded=$(( bytesneeded / 1024 + bytesneeded / 20480 ))
+ kbavailable=$(df -P -k $TARGET | sed -n "s|^$boot[[:space:]]\+[0-9]\+[[:space:]]\+[0-9]\+[[:space:]]\+\([0-9]\+\).*$|\1|p")