-
Notifications
You must be signed in to change notification settings - Fork 48
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
copyfile source file collision #196
Comments
Investigating... |
Please provide the redacted-as-necessary /etc/sdm/history from the IMG or console output from the customize command. Thx |
I think i found the issue from command output:
second copy:
` key being: below is the full redacted output: tcronin@tec-pi-mgr:~/src/piImage $ src/sdm/image.sh
|
Thanks! Will correct this for next release. |
This is fixed in v11.7. Please test/verify. Thx |
works! thanks for the quick turn around. |
Perfect. And thanks for finding this rather nasty bug. Using the same source filename in two different directories never occurred to me. 😵 |
just installed the latest version
using 2024-03-15-raspios-bookworm-arm64-lite.img
building image on same version
launched on a pi 3b+
tried with both the following:
separate plugins
--plugin copyfile:"from=/mnt/clones/data/home/tcronin/.ssh/authorized_keys|to=/home/tcronin/.ssh|runphase=postinstall|chown=tcronin:tcronin|chmod=600" \ --plugin copyfile:"from=/mnt/clones/data/home/ansible/.ssh/authorized_keys|to=/home/ansible/.ssh|runphase=postinstall|chown=ansible:ansible|chmod=600" \
and filelist
--plugin copyfile:"filelist=./filelist" \
filelist content
from=/mnt/clones/data/home/ansible/.ssh/authorized_keys|to=/home/ansible/.ssh|chown=ansible:ansible|chmod=600|mkdirif|runphase=postinstall from=/mnt/clones/data/home/tcronin/.ssh/authorized_keys|to=/home/tcronin/.ssh|chown=tcronin:tcronin|chmod=600|mkdirif|runphase=postinstall
both instances would copy the first from to each to target
even verified reordering the files
also the filelist command required adding the mkdirif even with a preceding mkdir plugin creating the target dir.
full customize command:
sudo sdm --customize \ --plugin user:"adduser=tcronin|password=$TEC_PWD" \ --plugin mkdir:"dir=/home/tcronin/.ssh|chown=tcronin:tcronin|chmod=700" \ --plugin copyfile:"from=/mnt/clones/data/home/tcronin/.ssh/authorized_keys|to=/home/tcronin/.ssh|runphase=postinstall|chown=tcronin:tcronin|chmod=600" \ --plugin user:"adduser=ansible|password=$ANS_PWD" \ --plugin mkdir:"dir=/home/ansible/.ssh|chown=ansible:ansible|chmod=700" \ --plugin copyfile:"from=/mnt/clones/data/home/ansible/.ssh/authorized_keys|to=/home/ansible/.ssh|runphase=postinstall|chown=ansible:ansible|chmod=600" \ --plugin user:"deluser=pi" \ --plugin L10n:"keymap=us|locale=en_US.UTF-8|timezone=America/Chicago" \ --regen-ssh-host-keys \ --plugin network:"netman=nm|wifissid=tec-wan|wifipassword=$WIFI_PWD|wificountry=US" \ --restart img/bookworm.img
The text was updated successfully, but these errors were encountered: