Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- which nvme 2>/dev/null >/dev/null ||
- exec echo 'nvme binary not found, do you have the nvme-cli package?'
- [ "$USER" = root ] || exec echo "unfortunately $0 needs root privileges to run"
- # be nice with the database, avoid duplicates please
- id=$(sha1sum /etc/machine-id |cut -c4-35)
- for n in /dev/nvme?; do
- nvme id-ctrl --raw-binary $n 2>/dev/null >/tmp/id-ctrl-$$ &&
- curl -F type=nvme \
- -F "machine_id=$id" \
- -F file=@/tmp/id-ctrl-$$ \
- https://staging.fwupd.org/lvfs/upload_hwinfo
- echo
- done
- rm -f /tmp/id-ctrl-$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement