Merge commit 'v0.2' into debian
authorAntonio Ospite <ospite@studenti.unina.it>
Sun, 2 Oct 2011 09:24:28 +0000 (11:24 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Sun, 2 Oct 2011 09:24:28 +0000 (11:24 +0200)
ChangeLog
kboot-mkconfig
kboot-mkconfig_lib

index 875955a..e4455ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2011-09-30 23:45:35 +0200  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Release v0.2 as the first actually working release (HEAD, v0.2, master)
+
+2011-09-30 22:49:38 +0200  Antonio Ospite  <ospite@studenti.unina.it>
+
+       * Fix several problems in linux_find_root_device (origin/master, origin/HEAD)
+
 2011-09-23 13:27:44 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
-       * Release a new version with a ChangeLog file (HEAD, v0.1a, master)
+       * Release a new version with a ChangeLog file (v0.1a)
 
 2011-09-23 13:14:41 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
@@ -12,7 +20,7 @@
 
 2011-09-22 13:03:09 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
-       * Remove the debian/ dir from the master branch (v0.1, origin/master, origin/HEAD)
+       * Remove the debian/ dir from the master branch (v0.1)
 
 2011-09-13 15:16:38 +0200  Antonio Ospite  <ospite@studenti.unina.it>
 
index 7a68a5e..fdc7a59 100755 (executable)
@@ -20,7 +20,7 @@
 set -e
 
 PACKAGE_NAME=kboot-mkconfig
-PACKAGE_VERSION=0.1a
+PACKAGE_VERSION=0.2
 
 prefix=/usr
 exec_prefix=${prefix}
index 155cca0..080edf7 100644 (file)
@@ -90,18 +90,20 @@ version_find_latest ()
 }
 
 linux_find_root_device() {
-  RDEV=$(mountpoint -d /)
+  ROOT_DEVICE=$(mountpoint -d /)
 
   for devnode in $(find /dev);
   do
-    if [ $(stat --printf="%t:%T" "$devnode") = $RDEV ];
+    # Get major and minor in decimal
+    CURRENT_DEVICE=$(printf "%d:%d" $(stat --printf="0x%t 0x%T" "$devnode"))
+    if [ $CURRENT_DEVICE = $ROOT_DEVICE ];
     then
-      ROOTDEVICE="$devnode"
+      ROOT_NODE="$devnode"
       break
     fi
   done
 
-  echo "$ROOTDEVICE"
+  echo "$ROOT_NODE"
 }
 
 linux_entry ()
@@ -144,7 +146,7 @@ list_kernels ()
     alt_version=`echo $version | sed -e "s,\.old$,,g"`
     # TODO: remove this too 
     #linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-    linux_root_device_thisversion=linux_find_root_device
+    linux_root_device_thisversion=`linux_find_root_device`
 
     initrd=
     for i in "initrd.img-${version}" "initrd-${version}.img" \