Skip to content

Instantly share code, notes, and snippets.

@consindo
Created May 29, 2013 11:25
Show Gist options
  • Save consindo/5669607 to your computer and use it in GitHub Desktop.
Save consindo/5669607 to your computer and use it in GitHub Desktop.
Postinst Chrome 27 udev
# Fedora 18 now has libudev.so.1. http://crbug.com/145160
# Same for Ubuntu 13.04. http://crbug.com/226002
LIBUDEV_0=libudev.so.0
LIBUDEV_1=libudev.so.1
add_udev_symlinks() {
get_lib_dir
if [ -f "/$LIBDIR/$LIBUDEV_0" -o -f "/usr/$LIBDIR/$LIBUDEV_0" -o -f "/lib/$LIBUDEV_0" ]; then
return 0
fi
if [ -f "/$LIBDIR/$LIBUDEV_1" ]; then
ln -snf "/$LIBDIR/$LIBUDEV_1" "/opt/google/chrome/$LIBUDEV_0"
elif [ -f "/usr/$LIBDIR/$LIBUDEV_1" ];
then
ln -snf "/usr/$LIBDIR/$LIBUDEV_1" "/opt/google/chrome/$LIBUDEV_0"
else
echo "$LIBUDEV_1" not found in "$LIBDIR" or "/usr/$LIBDIR".
exit 1
fi
}
remove_udev_symlinks() {
rm -rf "/opt/google/chrome/$LIBUDEV_0"
}
remove_udev_symlinks
add_udev_symlinks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment