]> gitweb.fluxo.info Git - hydra.git/commitdiff
Enhance grub.cfg
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 3 Jul 2016 12:54:04 +0000 (09:54 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 3 Jul 2016 12:54:04 +0000 (09:54 -0300)
doc/todo.rst
share/config/templates/bootless/grub.cfg

index 98431b151f9a1ac75d6111c22e696424241bef61..bbe16f634864d970ac458a6abc669a8a767122c2 100644 (file)
@@ -16,4 +16,6 @@ TODO
   - $APP_BASE/share/{hydra,hydractl}
   - /usr/local/share/{hydra,hydractl}
   - {hydra,hydract}-action (like git plugins)
-- bootless: per-device hash/verification.
+- bootless:
+ - per-device hash/verification.
+ - always copy grub.cfg.
index 3864c4a77a2faffe642384bafe377c331a438ba1..35827dbf0eb00b0e7e704fd82b16567b7641fc3a 100644 (file)
@@ -29,11 +29,13 @@ function bootfde {
   insmod luks
   insmod lvm
 
-  cryptomount lvm/${1}
-  set root=(crypto0)
-
   set volume=${1}
-  set version=${2}
+
+  if [ "${2}" ]; then
+    set version=${2}
+  else
+    set version=3.16.0-4-amd64
+  fi
 
   if [ "${3}" ]; then
     set source=${3}
@@ -47,10 +49,12 @@ function bootfde {
     set target=root
   fi
 
-       echo     "Loading ${volume}..."
-  linux  /boot/vmlinuz-${version} root=/dev/mapper/${target} cryptopts=target=${target},source=${source} ro quiet
-  echo   'Loading initial ramdisk ...'
-  initrd /boot/initrd.img-${version}
+  cryptomount lvm/${volume}
+  set         root=(crypto0)
+  echo        "Loading ${volume}..."
+  linux       /boot/vmlinuz-${version} root=/dev/mapper/${target} cryptopts=target=${target},source=${source} ro quiet
+  echo        'Loading initial ramdisk ...'
+  initrd      /boot/initrd.img-${version}
 }
 
 #
@@ -59,7 +63,12 @@ function bootfde {
 #
 function bootimg {
   set volume=${1}
-  set version=${2}
+
+  if [ "${2}" ]; then
+    set version=${2}
+  else
+    set version=3.16.0-4-amd64
+  fi
 
   if [ "${3}" ]; then
     set target=${3}
@@ -79,7 +88,7 @@ function bootimg {
     set distro=debian
   fi
 
-       echo     "Loading ${1}..."
+  echo   "Loading ${1}..."
   linux  /boot/custom/${distro}/vmlinuz-${version} root=/dev/mapper/${rootfs} cryptopts=target=${target},source=${volume} ro quiet apparmor=1 security=apparmor
   echo   'Loading initial ramdisk ...'
   initrd /boot/custom/${distro}/initrd.img-${version}