Fix ssh dir and init link

This commit is contained in:
Nico Schottelius 2020-06-02 17:20:12 +02:00
parent b96c39ccb6
commit 2a624e8442

View file

@ -42,6 +42,9 @@ for key in balazs dominique jinguk nico; do
curl -s ${keyurl}/${key}.pub >> ${dir}/root/.ssh/authorized_keys curl -s ${keyurl}/${key}.pub >> ${dir}/root/.ssh/authorized_keys
done done
# Fix possible permission issue from above
chown -R root:root ${dir}/root/
################################################################################ ################################################################################
# networking # networking
@ -73,7 +76,7 @@ chmod a+rx "${dir}/etc/rc.local"
# ensure there is /init in the initramfs -> otherwise there is a kernel panic # ensure there is /init in the initramfs -> otherwise there is a kernel panic
# reason: initramfs is designed to be PRE regular os, so /init usually hands over to /sbin/init # reason: initramfs is designed to be PRE regular os, so /init usually hands over to /sbin/init
# in our case, they are just the same # in our case, they are just the same
ln -s /sbin/init ${dir}/init ln -fs /sbin/init ${dir}/init
# Finally building the initramfs # Finally building the initramfs
( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} ) ( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} )