fickit: Use rootfs directory instead of lower
This commit is contained in:
parent
ed217b5d72
commit
e3e55c579a
@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -d /containers/onboot/004-synchro-ip-setup ]; then
|
||||
LOWER=/containers/onboot/004-synchro-ip-setup/lower
|
||||
elif [ -d /containers/onboot/004-nginx-ip-setup ]; then
|
||||
LOWER=/containers/onboot/004-nginx-ip-setup/lower
|
||||
if [ -d /containers/onboot/006-synchro-ip-setup ]; then
|
||||
LOWER=/containers/onboot/006-synchro-ip-setup/lower
|
||||
elif [ -d /containers/onboot/006-nginx-ip-setup ]; then
|
||||
LOWER=/containers/onboot/006-nginx-ip-setup/lower
|
||||
else
|
||||
nsenter -t 1 -m -u -i -p -- "$0" $@
|
||||
exit $?
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
mkdir -p /var/lib/fic/ssh/
|
||||
|
||||
cp /containers/services/sshd/lower/etc/ssh/* /var/lib/fic/ssh/
|
||||
cp /containers/services/sshd/rootfs/etc/ssh/* /var/lib/fic/ssh/
|
||||
|
||||
mount -o bind /dev /containers/services/sshd/lower/dev
|
||||
mount -o bind /proc /containers/services/sshd/lower/proc
|
||||
mount -o bind /sys /containers/services/sshd/lower/sys
|
||||
mount -o bind /var/lib/fic/ssh/ /containers/services/sshd/lower/etc/ssh
|
||||
mount -o bind /dev /containers/services/sshd/rootfs/dev
|
||||
mount -o bind /proc /containers/services/sshd/rootfs/proc
|
||||
mount -o bind /sys /containers/services/sshd/rootfs/sys
|
||||
mount -o bind /var/lib/fic/ssh/ /containers/services/sshd/rootfs/etc/ssh
|
||||
|
||||
chroot /containers/services/sshd/lower/ ssh-keygen -A
|
||||
chroot /containers/services/sshd/rootfs/ ssh-keygen -A
|
||||
|
||||
umount /containers/services/sshd/lower/dev /containers/services/sshd/lower/proc /containers/services/sshd/lower/sys /containers/services/sshd/lower/etc/ssh
|
||||
umount /containers/services/sshd/rootfs/dev /containers/services/sshd/rootfs/proc /containers/services/sshd/rootfs/sys /containers/services/sshd/rootfs/etc/ssh
|
||||
|
@ -71,7 +71,7 @@ onboot:
|
||||
- name: admin-ip-setup
|
||||
image: linuxkit/ip:v1.0.0
|
||||
#command: ["/bin/sh", "-c", "ip link add link eth3 name adminiface type vlan id 99; ip a add 172.16.99.219/24 dev adminiface; ip link set eth3 up; ip link set adminiface up; ip r add default via 172.16.99.1; ip a add 172.17.0.2/24 dev vethin-admin; ip link set vethin-admin up; ping -W 10 -c 1 172.16.99.1;" ]
|
||||
command: ["/bin/sh", "-c", "ip link set eth3 up; while read IP; do ip a add ${IP} dev eth3; done < /run/config/ip_config/backend-admin; ip r add default via $(cat /run/config/ip_config/backend-router); ip a add 172.17.0.2/24 dev vethin-admin; ip link set vethin-admin up; ping -W 10 -c 1 $(cat /run/config/ip_config/backend-router); ip link show eth1 2> /dev/null && { ip a add 10.0.0.1/24 dev eth1; ip link set eth1 up; };" ]
|
||||
command: ["/bin/sh", "-c", "ip link set eth3 up; while read IP; do ip a add ${IP} dev eth3; done < /run/config/ip_config/backend-admin; ip r add default via $(cat /run/config/ip_config/backend-router); ip a add 172.17.0.2/24 dev vethin-admin; ip link set vethin-admin up; echo 'Waiting for' $(cat /run/config/ip_config/backend-router); ping -W 10 -c 1 $(cat /run/config/ip_config/backend-router); ip link show eth1 2> /dev/null && { ip a add 10.0.0.1/24 dev eth1; ip link set eth1 up; };" ]
|
||||
net: new
|
||||
binds:
|
||||
- /run/config/ip_config/:/run/config/ip_config/:ro
|
||||
|
Loading…
x
Reference in New Issue
Block a user