# Secondly, check the integrity of the backup
if test -e $INSTALLDIR/busybox.distrib.sha1; then
if test "`cat $INSTALLDIR/busybox.distrib.sha1`" != "$ORIGBINARY_SHA1"; then
- if test "`cat $INSTALLDIR/busybox.distrib.version`" == "`GETBBVERSION`"; then
- # The backup has been changed whilst busybox hasn't been upgraded
+ if test -e $INSTALLDIR/busybox.distrib.version; then
+ if test "`cat $INSTALLDIR/busybox.distrib.version`" == "`GETBBVERSION`"; then
+ # The backup has been changed whilst busybox hasn't been upgraded
+ echo -e "Warning: the backup of the original BusyBox binary has" \
+ "been modified since installing busybox-power (invalid SHA1" \
+ "checksum). Do not continue unless you're sure that $DISTBIN" \
+ "is not corrupted.\n" >> /tmp/busybox-power-error
+ fi
+ else
echo -e "Warning: the backup of the original BusyBox binary has" \
- "been modified since installing busybox-power (invalid SHA1" \
- "checksum). Do not continue unless you're sure that $DISTBIN" \
- "is not corrupted.\n" >> /tmp/busybox-power-error
+ "been modified since installing busybox-power (invalid SHA1" \
+ "checksum). We could not determine whether this is due to a BusyBox" \
+ "upgrade (e.g. by an (C)SSU update) or not. Do not continue unless" \
+ "either the latter is the case, or you're via other ways sure that" \
+ "$DISTBIN is not corrupted.\n" >> /tmp/busybox-power-error
fi
fi
else
# Get the version string of the package providing /bin/busybox
GETBBVERSION() {
# XXX We assume the package "busybox" provides /bin/busybox
- /usr/bin/dpkg -s busybox | awk '/^Version:/ {print $2}'
+ /usr/bin/dpkg -s busybox | $EXECPWR awk '/^Version:/ {print $2}'
}