Muli Ben-Yehuda
2005-Nov-24 19:19 UTC
[Xen-devel] [PATCH] fix udevinfo version string parsing
check_hotplug fails on one of my machines running ubunto 4.10 "Warty Warhog", due to misparsing the udevinfo version string. The problem is caused by an old version of sed that does not appreciate the regexp. This patch fixes it, and also works on debian unstable and SLES9SP2. Please apply... Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org> Signed-Off-By: Orna Agmon <ladypine@ladypine.org> diff -r dca4893b0b9f14a99ea46abcadcefc3246707585 -r 962bf38a5c6f7ffdb5f9fea0265cb7b1659c6d5c install.sh --- a/install.sh Thu Nov 24 14:08:27 2005 +++ b/install.sh Thu Nov 24 19:16:40 2005 @@ -28,7 +28,7 @@ echo "All done." [ -x "$(which udevinfo)" ] && \ - UDEV_VERSION=$(udevinfo -V | sed -e ''s/^.*\s\([0-9]\+\)[^0-9]*/\1/'') + UDEV_VERSION=$(udevinfo -V | sed -e ''s/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'') if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/ diff -r dca4893b0b9f14a99ea46abcadcefc3246707585 -r 962bf38a5c6f7ffdb5f9fea0265cb7b1659c6d5c tools/check/check_hotplug --- a/tools/check/check_hotplug Thu Nov 24 14:08:27 2005 +++ b/tools/check/check_hotplug Thu Nov 24 19:16:40 2005 @@ -7,7 +7,7 @@ exit 1 } [ -x "$(which udevinfo)" ] && \ - UDEV_VERSION=$(udevinfo -V | sed -e ''s/^.*\s\([0-9]\+\)[^0-9]*/\1/'') + UDEV_VERSION=$(udevinfo -V | sed -e ''s/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'') if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then exit 0 -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Nov-25 15:26 UTC
Re: [Xen-devel] [PATCH] fix udevinfo version string parsing
On Thu, Nov 24, 2005 at 09:19:02PM +0200, Muli Ben-Yehuda wrote:> check_hotplug fails on one of my machines running ubunto 4.10 "Warty > Warhog", due to misparsing the udevinfo version string. The problem is > caused by an old version of sed that does not appreciate the > regexp. This patch fixes it, and also works on debian unstable and > SLES9SP2. Please apply... > > Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org> > Signed-Off-By: Orna Agmon <ladypine@ladypine.org>Applied, thank you. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel