iankelling.org
/
git
/
automated-distro-installer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7386cdb
)
improve code style
author
Ian Kelling
<ian@iankelling.org>
Sat, 11 Feb 2017 08:45:35 +0000
(
00:45
-0800)
committer
Ian Kelling
<ian@iankelling.org>
Sat, 11 Feb 2017 08:46:03 +0000
(
00:46
-0800)
fai/config/hooks/partition.DEFAULT
patch
|
blob
|
history
diff --git
a/fai/config/hooks/partition.DEFAULT
b/fai/config/hooks/partition.DEFAULT
index 8dffd82b89c18a4fec5fd6616a5c6aa722ef35ac..9914a458c952d514e9c7778d2719b65131607740 100755
(executable)
--- a/
fai/config/hooks/partition.DEFAULT
+++ b/
fai/config/hooks/partition.DEFAULT
@@
-65,20
+65,21
@@
add-part() { # add partition suffix to $dev
echo $ret
}
echo $ret
}
-bootdev() { add-part $@ $bootn; }
+# Functions here are commented because they are unused, but left
+# intentionally because they follow the pattern and could be useful in
+# the future.
+#bootdev() { add-part $@ $bootn; }
rootdev() { add-part $@ $rootn; }
swapdev() { add-part $@ $swapn; }
grub_extdev() { add-part $@ $grub_extn; }
rootdev() { add-part $@ $rootn; }
swapdev() { add-part $@ $swapn; }
grub_extdev() { add-part $@ $grub_extn; }
-# Commented because it's not used, but left because it
-# finishes the pattern and if we ever do need to use it, it's here.
#bios_grubdev() { add-part $@ $bios_grubn; }
crypt-dev() { echo /dev/mapper/crypt_dev_${1##*/}; }
crypt-name() { echo crypt_dev_${1##*/}; }
root-cryptdev() { crypt-dev $(rootdev $@); }
#bios_grubdev() { add-part $@ $bios_grubn; }
crypt-dev() { echo /dev/mapper/crypt_dev_${1##*/}; }
crypt-name() { echo crypt_dev_${1##*/}; }
root-cryptdev() { crypt-dev $(rootdev $@); }
-swap-cryptdev() { crypt-dev $(swapdev $@); }
-root-cryptname() { crypt-name $(rootdev $@); }
-swap-cryptname() { crypt-name $(swapdev $@); }
+
#
swap-cryptdev() { crypt-dev $(swapdev $@); }
+
#
root-cryptname() { crypt-name $(rootdev $@); }
+
#
swap-cryptname() { crypt-name $(swapdev $@); }
##### end function defs
##### end function defs
@@
-115,8
+116,8
@@
fi
for dev in ${short_devs[@]}; do
if $partition; then break; fi
y=$(readlink -f $dev)
for dev in ${short_devs[@]}; do
if $partition; then break; fi
y=$(readlink -f $dev)
-
x
=($y[0-9])
- [[ ${#
x
[@]} == "${lastn}" ]] || partition=true
+
arr
=($y[0-9])
+ [[ ${#
arr
[@]} == "${lastn}" ]] || partition=true
for (( i=1; i <= lastn; i++ )); do
[[ -e ${dev}$i ]] || partition=true
done
for (( i=1; i <= lastn; i++ )); do
[[ -e ${dev}$i ]] || partition=true
done