forked from ungleich-public/cdist
add support for swap
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
67cbfee60b
commit
9fd74acfac
1 changed files with 14 additions and 12 deletions
|
@ -21,16 +21,18 @@
|
|||
device="(cat "$__object/parameter/device")"
|
||||
type="(cat "$__object/parameter/type")"
|
||||
|
||||
command="mkfs -t $type"
|
||||
|
||||
if [ -f "$__object/parameter/options" ]; then
|
||||
if [ "$type" = "swap" ]; then
|
||||
echo "mkswap $device"
|
||||
else
|
||||
command="mkfs -t $type"
|
||||
if [ -f "$__object/parameter/options" ]; then
|
||||
options="(cat "$__object/parameter/options")"
|
||||
command="$command -o '$options'"
|
||||
fi
|
||||
command="$command $device"
|
||||
if [ -f "$__object/parameter/blocks" ]; then
|
||||
fi
|
||||
command="$command $device"
|
||||
if [ -f "$__object/parameter/blocks" ]; then
|
||||
blocks="(cat "$__object/parameter/blocks")"
|
||||
command="$command $blocks"
|
||||
fi
|
||||
echo "$command"
|
||||
fi
|
||||
|
||||
echo "$command"
|
||||
|
|
Loading…
Reference in a new issue