fickit: crypt main partition

This commit is contained in:
nemunaire 2020-01-30 19:03:14 +01:00
parent 0c8bc261d9
commit 56c6f282c4
4 changed files with 22 additions and 8 deletions

View File

@ -1,11 +1,11 @@
#!/bin/sh
if [ -d /containers/onboot/004-admin-ip-setup ]; then
LOWER=/containers/onboot/004-admin-ip-setup/lower
if [ -d /containers/onboot/004-synchro-ip-setup ]; then
LOWER=/containers/onboot/004-synchro-ip-setup/lower
elif [ -d /containers/onboot/004-frontal-ip-setup ]; then
LOWER=/containers/onboot/004-frontal-ip-setup/lower
else
nsenter -t 1 -a "$0" $@
nsenter -t 1 -m -u -i -p -- "$0" $@
exit $?
fi

View File

@ -1,3 +1,3 @@
#!/bin/sh
nsenter -t $(pgrep mysql | head -1) -a mysql $@
nsenter -t $(pgrep mysql | head -1) -m -u -i -n -p -- mysql $@

View File

@ -23,10 +23,13 @@ onboot:
# Filesystem
- name: swap
image: linuxkit/swap:v0.7
command: ["/sbin/swapon", "/dev/sda2", "/dev/sdb2"]
command: ["/sbin/swapon", "/dev/md1"]
- name: dm-crypt
image: linuxkit/dm-crypt:v0.7
command: ["/usr/bin/crypto", "-l", "crypt_fic", "/dev/md0"]
- name: mount
image: linuxkit/mount:v0.7
command: ["/usr/bin/mountie", "-device", "/dev/md0", "/var/lib/fic" ]
command: ["/usr/bin/mountie", "-device", "/dev/mapper/crypt_fic", "/var/lib/fic" ]
# Network
# - name: dhcpcd
@ -373,6 +376,10 @@ files:
COMMIT
mode: "0440"
- path: etc/dm-crypt/key
source: configs/dm-crypt.key
mode: "0440"
trust:
org:
- linuxkit

View File

@ -23,10 +23,13 @@ onboot:
# Filesystem
- name: swap
image: linuxkit/swap:v0.7
command: ["/sbin/swapon", "/dev/sda2", "/dev/sdb2"]
command: ["/sbin/swapon", "/dev/md1"]
- name: dm-crypt
image: linuxkit/dm-crypt:v0.7
command: ["/usr/bin/crypto", "-l", "crypt_fic", "/dev/md0"]
- name: mount
image: linuxkit/mount:v0.7
command: ["/usr/bin/mountie", "-device", "/dev/md0", "/var/lib/fic" ]
command: ["/usr/bin/mountie", "-device", "/dev/mapper/crypt_fic", "/var/lib/fic" ]
# Network
# - name: ntp
@ -512,6 +515,10 @@ files:
COMMIT
mode: "0440"
- path: etc/dm-crypt/key
source: configs/dm-crypt.key
mode: "0440"
trust:
org:
- linuxkit