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

Get wrong loop device's name when the loop device's name was more than 9. #17

Open
ev4ngel opened this issue Oct 12, 2023 · 0 comments
Open

Comments

@ev4ngel
Copy link

ev4ngel commented Oct 12, 2023

https://github.com/nanhantianyi/rpi-backup/blob/4a1124554d89e03bee360ef6b399a297b81f4e73/back.sh#L60C48-L60C48

The backup script didn't work for me at first.I tried to print every line's result and find out the loop device's name was loop15 ,so i added a '+' after loop[0-9] phrase,and it did work.

device=`kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1`
-------------------------------------------------------^-------------------
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

1 participant