diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-12-16 11:36:47 -0500 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-12-16 11:36:47 -0500 |
commit | 607e54669166783de341fd9d4ddba3c8e7c8947c (patch) | |
tree | 6b2098b43e20144cf06199c6ef0f81d3f188f5fb /init | |
parent | ba9b4aab3daa4acbf6a8b0cc44f882e404e9f0e4 (diff) | |
download | minitramfs-607e54669166783de341fd9d4ddba3c8e7c8947c.tar.xz minitramfs-607e54669166783de341fd9d4ddba3c8e7c8947c.zip |
simplify autologin, don't use UUID
Diffstat (limited to 'init')
-rw-r--r-- | init | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -24,8 +24,7 @@ udhcpc -i eth0 dropbear -p 2222 ) >/dev/null 2>&1 & -root=$(findfs UUID=ec8fb072-1200-4275-9494-f6f869187806) || exit -if cryptsetup open --tries 65535 --allow-discards --perf-no_read_workqueue --perf-no_write_workqueue "$root" root; then +if cryptsetup open --tries 65535 /dev/nvme0n1p2 root; then autologin=1 fi [ -e /dev/mapper/root ] || exit @@ -37,9 +36,7 @@ kill -9 -1 cd /mnt || exit if [ -n "$autologin" ]; then mount -t tmpfs -o mode=755,nodev,nosuid,strictatime tmpfs run || exit - mkdir -p run/systemd/system/getty.target.wants || exit - ln -s /dev/null run/systemd/system/getty.target.wants/getty@tty1.service || exit - ln -s /etc/systemd/system/getty-autologin.service run/systemd/system/getty.target.wants/ || exit + touch run/autologin || exit fi umount -n /dev/pts /dev /proc exec switch_root . /usr/lib/systemd/systemd |