Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default tape defenition for compile-time and reading path to device from TAPE environment variable #26

Closed
wants to merge 3 commits into from

Conversation

svalx
Copy link

@svalx svalx commented Dec 1, 2020

Introduce default device feature. If -f option omitted, stenc will try to read TAPE environment variable and use it for device name definition. If TAPE not defined, the default device name will be used. The default device name is /dev/nst0 and can be changed at compile-time by using the --with-default-tape-drive configure option.

@jonasstein jonasstein added the enhancement New feature or request label Apr 24, 2022
@jonasstein
Copy link
Collaborator

jonasstein commented Apr 24, 2022

I guess that every user of stenc also uses mt which evaluates the TAPE environment variable too.
They write in the man page

-f, -t The path of the tape device on  which to operate.  
       If neither of those options is given, and the environment variable 
       TAPE is set, it is used.  Otherwise, a default device defined in
       the file /usr/include/sys/mtio.h is used (note that the actual path 
       to mtio.h can vary per architecture and/or distribution).

https://github.com/iustin/mt-st

@svalx
Copy link
Author

svalx commented Apr 24, 2022

In /usr/include/sys/mtio.h it looks like this:

/* Specify default tape device.  */
#ifndef DEFTAPE
# define DEFTAPE        "/dev/tape"
#endif

But modern distributions doesn't have /dev/tape as link to /dev/nst0 any more. Instead it uses udev and creates different names in /dev/tape/by-id/ directory. See my commit to mt-st: iustin/mt-st#8
I am maintain and use stenc in openSUSE with this patch - https://build.opensuse.org/package/show/Archiving:Backup/stenc

@jonasstein
Copy link
Collaborator

I did not understand the PR regarding the manpage. I close this ticket, because I think main part it is fixed with #48. Please open a new PR, if we missed something.

@jonasstein jonasstein closed this May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants