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

arch compatibility #1

Open
efraletti opened this issue Mar 25, 2022 · 3 comments
Open

arch compatibility #1

efraletti opened this issue Mar 25, 2022 · 3 comments

Comments

@efraletti
Copy link

if [ -c "$printer_path" ] && [ $(sudo usb_printerid "$printer_path" | grep "HL-111[0-9] series" -c) -gt 0 ]; then

i got this to work on manjaro/arch changing the command to:

if [ -c "$printer_path" ] && [ $(udevadm info --name="$printer_path" --attribute-walk | grep "HL-111[0-9] series" -c) -gt 0 ]; then

maybe helps someone

@filisko
Copy link
Owner

filisko commented Mar 31, 2022

hi @efraletti ! thanks for submitting this, need to try this out on debian based distros and if it's compatible then merge it.

@efraletti
Copy link
Author

You're welcome, and thank you very much for this script!

I was able to diagnose and see some info on my HL-1112 with it.

@efraletti
Copy link
Author

efraletti commented Apr 1, 2022

I discovered today that udevadm is part of our "good and old beloved systemd". In distros without it, it will break.

I am now in arch manjaro, where the debian usb_printerid is not to be found.

Maybe with some more digging or some if/elses we can make it work everywhere.

Also, with CUPS's lpinfo --include-schemes usb -l -v | grep "HL-111[0-9] series" -c it is possible to get a grep and the if goes to true on -gt 0, which appears to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants