amiaopensource / ltopers

Bash scripts to manage LTO cartridges with LTFS
https://github.com/amiaopensource/ltopers
MIT License
39 stars 8 forks source link

output of `writelto -h` starts with other information #123

Closed retokromer closed 7 years ago

retokromer commented 7 years ago

When running writelto -h, now I get at the beginning some informations that has nothing to do with the help itself:

[07:35:59]macOS@test:~/Desktop$ writelto -h
LTO_INDEX_DIR is not set in mmconfig. Default of /Users/macOS/Documents/lto_indexes will be used.
If a different location is desired please set this in mmconfig
writelto 2017-08-04
This script writes the contents of a specified directory onto a mounted
LTFS-formated LTO tape.
Dependencies: gcp mmfunctions

Usage: writelto -t [-e] [-v] | -h
  -t  tape serial
  -e  state yes (Y) or no (N) to ejecting the tape after write, default
      is yes
  -v  reads back and creates checksums for the contents of a tape, and
      writes checksums to a file named with the tape name and date,
      located in the LTO logs directory
  -h  display this help
[07:36:37]macOS@test:~/Desktop$ 

cc @BleakleyMcD

BleakleyMcD commented 7 years ago

That is pulling from mmfunctions where LTO_INDEX_DIR is defined. I didn't know writelto -h would pull that text. So, either -h needs to be adjusted or mmfunctions does. I don't know what is easier from your end. I can make the changes in mmfunctions if you want.

Though I do think the writelto help page is perhaps a good place to have information about setting LTO_INDEX_DIR and LTO_MD5_FLAGS in mmconfig. I wouldn't say they have nothing to do with the help.

retokromer commented 7 years ago

The other -h we currently have in the LTOpers’ functions do inform the user on:

Therefore I personally do not think that the information about the LTO_INDEX_DIR should appear here, but I am happy to change my mind, if I am wrong.

However, if you wish that the information about setting LTO_INDEX_DIR and LTO_MD5_FLAGS in mmconfig is given in writelto, then I would suggest that this appears at the end, and not at the very beginning. Function name and version should come first, in my opinion.

retokromer commented 7 years ago

I am closing this. Sorry, my company will not longer use LTOpers for its clients, but switch to openLTO, because I am spending too much time tracking incompatibilities with mm and trying to keep this open for users outside CUNY.

dericed commented 7 years ago

reopening since issue persists

retokromer commented 7 years ago

Opening a new one would have avoided that it appears under the ones I am working on… ;-)

dericed commented 7 years ago

Assigned to self

dericed commented 7 years ago

fixed via https://github.com/mediamicroservices/mm/pull/182, thx @BleakleyMcD