Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- [ -f "$1" ] || exec echo "$1 does not exist"
- for i in virt-edit guestfish; do
- which "$i" >/dev/null 2>/dev/null || exec echo "$i not found"
- done
- virt-edit -a "$1" /etc/shadow -e 's/^root:[^:]*:/root::/'
- guestfish -a "$1" -i rm '/etc/systemd/system/multi-user.target.wants/cloud-config.service'
- guestfish -a "$1" -i rm '/etc/systemd/system/multi-user.target.wants/cloud-final.service'
- guestfish -a "$1" -i rm '/etc/systemd/system/multi-user.target.wants/cloud-init-local.service'
- guestfish -a "$1" -i rm '/etc/systemd/system/multi-user.target.wants/cloud-init.service'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement