summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2b05654)
This one works under 'piuparts' as well, the previous one based on
'mount' was producing a string not usable with 'readlink'
bindir=${exec_prefix}/bin
libdir=${exec_prefix}/lib
bindir=${exec_prefix}/bin
libdir=${exec_prefix}/lib
-LINUX_ROOT_DEVICE="$(readlink -f $(mount | grep ' / ' | cut -d ' ' -f 1))"
+# TODO: remove this if the following find_linux_root_device()
+# is found to be reliable enough
+#LINUX_ROOT_DEVICE="$(readlink -f $(mount | grep ' / ' | cut -d ' ' -f 1))"
if $(which gettext >/dev/null 2>/dev/null) ; then
gettext="gettext"
if $(which gettext >/dev/null 2>/dev/null) ; then
gettext="gettext"
+linux_find_root_device() {
+ RDEV=$(mountpoint -d /)
+
+ for devnode in $(find /dev);
+ do
+ if [ $(stat --printf="%t:%T" "$devnode") = $RDEV ];
+ then
+ ROOTDEVICE="$devnode"
+ break
+ fi
+ done
+
+ echo "$ROOTDEVICE"
+}
+
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+ # TODO: remove this too
+ #linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+ linux_root_device_thisversion=linux_find_root_device
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \