summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-08-12 16:35:56 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-08-12 16:35:56 -0400
commit85aaece776c38077dd6e406bd5aa82b8914a8a48 (patch)
treeab068d83bc0bfaf0641c2befcd9acc91a1698135
parent239eb29ff51ea9a4abae14989afe7409164a7337 (diff)
osi-mk: Tidy up
-rwxr-xr-xosi-mk11
1 files changed, 5 insertions, 6 deletions
diff --git a/osi-mk b/osi-mk
index 8b42d98..bc17645 100755
--- a/osi-mk
+++ b/osi-mk
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# 2018 Luke Shumaker
declare -r NAME=osi-mk
-declare -r VERSION=20180805
+declare -r VERSION=20180812
# Why is this different than mkosi[1]?
#
@@ -19,6 +19,7 @@ declare -r VERSION=20180805
#
# [1]: https://github.com/systemd/mkosi
+set -euE
source "${BASH_SOURCE[0]%/*}/lib/osi.sh"
loaded_modules=()
@@ -47,8 +48,6 @@ osi-mk:directories() {
}
main() {
- set -euE
-
local arg_mode=outside
local arg_mountpoint=
local arg_size=1G
@@ -102,8 +101,8 @@ main() {
return 0
;;
usage)
- print 'Usage: %s [OPTIONS]' "${0##*/} FILENAME.IMG"
- print 'Make Operating System Image'
+ print 'Usage: %s [OPTIONS] FILENAME.img' "${0##*/}"
+ print 'Operating System Image: Make'
echo
print 'Create a mountable, bootable OS image.'
echo
@@ -175,7 +174,7 @@ main() {
### Boot ###
cat <<-'EOT' >> "$arg_mountpoint/etc/default/grub"
GRUB_TIMEOUT=0
- GRUB_DEFAULT=1
+ GRUB_DEFAULT=1 # Use the fallback initramfs, to get all drivers
EOT
arch-chroot -- "$arg_mountpoint" sh -c \
'grub-install "$(awk '\''$2 == "/" { print $1 }'\'' </proc/mounts)"'