device now defaults to object_id
This commit is contained in:
parent
13b2443d6b
commit
8747474fd5
5 changed files with 18 additions and 8 deletions
|
@ -20,7 +20,11 @@
|
|||
|
||||
os=$("$__explorer/os")
|
||||
|
||||
if [ -f "$__object/parameter/device" ]; then
|
||||
blkdev="$(cat "$__object/parameter/device")"
|
||||
else
|
||||
blkdev="$__object_id"
|
||||
fi
|
||||
|
||||
case "$os" in
|
||||
centos|fedora|redhat|suse|gentoo)
|
||||
|
|
|
@ -20,7 +20,12 @@
|
|||
|
||||
|
||||
fstype="$(cat "$__object/parameter/fstype")"
|
||||
|
||||
if [ -f "$__object/parameter/device" ]; then
|
||||
mydev="$(cat "$__object/parameter/device")"
|
||||
else
|
||||
mydev="$__object_id"
|
||||
fi
|
||||
|
||||
label="$(cat "$__object/parameter/label")"
|
||||
mkfsoptions="$(cat "$__object/parameter/mkfsoptions")"
|
||||
|
|
|
@ -22,8 +22,12 @@ REQUIRED PARAMETERS
|
|||
fstype
|
||||
Filesystem type, for example 'ext3', 'btrfs' or 'xfs'
|
||||
|
||||
|
||||
|
||||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
device
|
||||
Blockdevice for filesystem,
|
||||
Blockdevice for filesystem, Defaults to object_id.
|
||||
On linux, it can be any by lsblk accepted device notation
|
||||
|
||||
for example
|
||||
|
@ -31,9 +35,6 @@ device
|
|||
or /dev/disk/by-xxxx/xxx
|
||||
or /dev/mapper/xxxx
|
||||
|
||||
|
||||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
label
|
||||
Label which sould apply on the filesystem
|
||||
|
||||
|
@ -61,7 +62,7 @@ EXAMPLES
|
|||
.. code-block:: sh
|
||||
|
||||
# Ensures that device /dev/sdb is formated with xfs
|
||||
__filesystem dev_sdb --fstype xfs --device /dev/sdb --label Testdisk1
|
||||
__filesystem /dev/sdb --fstype xfs --label Testdisk1
|
||||
# The same thing with btrfs and disk spezified by pci path to disk 1:0 on vmware
|
||||
__filesystem dev_sdb --fstype btrfs --device /dev/disk/by-path/pci-0000:0b:00.0-scsi-0:0:0:0 --label Testdisk2
|
||||
# Make sure that a multipath san device has a filesystem ...
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
device
|
||||
label
|
||||
mkfsoptions
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
fstype
|
||||
device
|
||||
|
|
Loading…
Reference in a new issue