diff --git a/clone/clone b/clone/clone index 33aeb77..f45a531 100755 --- a/clone/clone +++ b/clone/clone @@ -85,7 +85,8 @@ step3(){ test $confirm_burn != "y" && echo "<<< aborting" && exit; # (2) Burning image into disk # - sudo dd if=./original.img of=$DEV bs=4M status=progress || $( echo "<<< error: dd command failed" && exit ); + ( dd if=./original.img bs=4M | pv -s $(du -bs ./original.img) | sudo dd of=$DEV bs=4M ) \ + || $( echo "<<< error: dd command failed" && exit ); echo "<<< done"; @@ -139,6 +140,7 @@ step5(){ #sudo rm /mnt/etc/shadow.tmp; echo " (.) Copying pi's .bashrc to sats-user"; + sudo mkdir /mnt/home/sats-user; sudo cp /mnt/home/pi/.bashrc /mnt/home/sats-user/.bashrc; sudo chown 666:666 /mnt/home/sats-user/.bashrc; sudo chmod 544 /mnt/home/sats-user/.bashrc; @@ -240,10 +242,10 @@ step8(){ #sudo chmod 755 /mnt/etc/systemd/system/autologin@.service; # (2) Create link in order to be handled # - echo " (.) Create script link to be handled"; - #test -e /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service && sudo rm /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service; + echo " (.) Link systemd files to be handled"; sudo ln -fs /mnt/etc/systemd/system/autologin@.service /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service; + sudo ln -fs /mnt/lib/systemd/system/multi-user.target /mnt/etc/systemd/system/default.target; # (3) Update autologin script # #echo " (.) Update script to autologin as 'sats-user'"; #sudo cat /mnt/etc/systemd/system/autologin@.service | \