last cleanups

This commit is contained in:
Daniel Heule 2016-08-02 10:07:27 +02:00
parent 36c20230b8
commit 13b2443d6b
4 changed files with 12 additions and 12 deletions

View file

@ -20,7 +20,7 @@
os=$("$__explorer/os")
blkdev="$(cat "$__object/parameter/blkdev")"
blkdev="$(cat "$__object/parameter/device")"
case "$os" in
centos|fedora|redhat|suse|gentoo)

View file

@ -20,7 +20,7 @@
fstype="$(cat "$__object/parameter/fstype")"
mydev="$(cat "$__object/parameter/blkdev")"
mydev="$(cat "$__object/parameter/device")"
label="$(cat "$__object/parameter/label")"
mkfsoptions="$(cat "$__object/parameter/mkfsoptions")"
@ -35,10 +35,10 @@ fi
blkdev_devname="$(grep -P -o2 'NAME="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_fstype="$(grep -P -o2 'FSTYPE="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_label="$(grep -P -o2 'LABEL="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_mountpoint="$(grep -P -o2 'MOUNTPOINT="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_devname="$(grep -P -o 'NAME="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_fstype="$(grep -P -o 'FSTYPE="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_label="$(grep -P -o 'LABEL="\K[^"]*' "$__object/explorer/lsblk")"
blkdev_mountpoint="$(grep -P -o 'MOUNTPOINT="\K[^"]*' "$__object/explorer/lsblk")"
if [ -z "$blkdev_devname" ]; then
echo "Specified device $mydev not found on target system" >&2

View file

@ -22,7 +22,7 @@ REQUIRED PARAMETERS
fstype
Filesystem type, for example 'ext3', 'btrfs' or 'xfs'
blkdev
device
Blockdevice for filesystem,
On linux, it can be any by lsblk accepted device notation
@ -51,7 +51,7 @@ force
MESSAGES
--------
filesystem <fstype> on <blkdev> : <discoverd device> created
filesystem <fstype> on <device> : <discoverd device> created
Filesytem was created on <discoverd device>
@ -61,11 +61,11 @@ EXAMPLES
.. code-block:: sh
# Ensures that device /dev/sdb is formated with xfs
__filesystem dev_sdb --fstype xfs --blkdev /dev/sdb --label Testdisk1
__filesystem dev_sdb --fstype xfs --device /dev/sdb --label Testdisk1
# The same thing with btrfs and disk spezified by pci path to disk 1:0 on vmware
__filesystem dev_sdb --fstype btrfs --blkdev /dev/disk/by-path/pci-0000:0b:00.0-scsi-0:0:0:0 --label Testdisk2
__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 ...
__filesystem dev_sdb --fstype xfs --blkdev /dev/mapper/360060e80432f560050202f22000023ff --label Testdisk3
__filesystem dev_sdb --fstype xfs --device /dev/mapper/360060e80432f560050202f22000023ff --label Testdisk3
AUTHORS

View file

@ -1,2 +1,2 @@
fstype
blkdev
device