Fix maschinenplatzpi.
authorBenjamin Braatz <bb@bbraatz.eu>
Wed, 4 Jan 2023 09:14:58 +0000 (10:14 +0100)
committerBenjamin Braatz <bb@bbraatz.eu>
Wed, 4 Jan 2023 09:14:58 +0000 (10:14 +0100)
doc/index.md
doc/maschinenplatzpi.md
maschinenplatzpi/etc/pam.d/cage [deleted file]
maschinenplatzpi/etc/systemd/system/cage@.service [deleted file]
maschinenplatzpi/etc/systemd/system/default.target [deleted symlink]
maschinenplatzpi/etc/systemd/system/getty.target.wants/getty@tty1.service [new symlink]
maschinenplatzpi/etc/systemd/system/getty@tty1.service.d/autologin.conf [new file with mode: 0644]
maschinenplatzpi/etc/systemd/system/graphical.target.wants/cage@tty1.service [deleted symlink]
maschinenplatzpi/home/pi/.bash_profile [new file with mode: 0644]

index 016b43b986f5ce1b234d786e37ce871e79896133..e0991f728bbf16e5cda5337021d4535767e36219 100644 (file)
@@ -11,7 +11,7 @@ $ cd /tmp
 $ wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz
 $ sudo mkdir controlpi 
 $ sudo mount -t tmpfs none controlpi/
-$ sudo tar -xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C controlpi/
+$ sudo tar xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C controlpi/
 ```
 
 In chroot wechseln und erstes Upgrade:
@@ -122,7 +122,7 @@ Konfiguration das Einloggen mit Passwort komplett unterbindet.
 ## Image erstellen und aufspielen
 Von außerhalb des chroot:
 ```console
-$ sudo tar -czf controlpi.tar.gz -C controlpi/ .
+$ sudo tar czf controlpi.tar.gz -C controlpi/ .
 $ fallocate -l 4G 20YY-MM-DD-controlpi-arch.img
 $ sudo losetup --find --show 20YY-MM-DD-controlpi-arch.img
 $ sudo parted --script /dev/loop0 mklabel msdos
@@ -133,7 +133,7 @@ $ sudo mkfs.ext4 -F /dev/loop0p2
 $ sudo mount /dev/loop0p2 /mnt
 $ sudo mkdir /mnt/boot
 $ sudo mount /dev/loop0p1 /mnt/boot
-$ sudo tar -xpf controlpi.tar.gz -C /mnt/
+$ sudo tar xpf controlpi.tar.gz -C /mnt/
 $ sudo umount /mnt/boot
 $ sudo umount /mnt
 $ sudo losetup --detach /dev/loop0
index 3c895485da8f1831e0c2c40fe56ffacf3d29790c..2f23df23e5dd07136a8f021f91ab50f02a193150 100644 (file)
@@ -112,8 +112,6 @@ maschinenplatzpi/
 │   ├── chrony.conf
 │   ├── iptables
 │   │   └── iptables.rules
-│   ├── pam.d
-│   │   └── cage
 │   ├── sysctl.d
 │   │   └── 60-router.conf
 │   └── systemd
@@ -124,14 +122,15 @@ maschinenplatzpi/
 │       │   ├── 20-extern.network
 │       │   └── 20-intern.network
 │       └── system
-│           ├── cage@.service
\94\82           â\94\9câ\94\80â\94\80 default.target -> /usr/lib/systemd/system/graphical.target
-│           ├── graphical.target.wants
-│           │   └── cage@tty1.service -> /etc/systemd/system/cage@.service
+│           ├── getty.target.wants
\94\82           â\94\82   â\94\94â\94\80â\94\80 getty@tty1.service -> /usr/lib/systemd/system/getty@.service
+│           ├── getty@tty1.service.d
+│           │   └── autologin.conf
 │           └── multi-user.target.wants
 │               └── chronyd.service -> /usr/lib/systemd/system/chronyd.service
 └── home
     └── pi
+        ├── .bash_profile
         └── index.html
 ```
 
diff --git a/maschinenplatzpi/etc/pam.d/cage b/maschinenplatzpi/etc/pam.d/cage
deleted file mode 100644 (file)
index 4523a93..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-auth           required        pam_unix.so nullok
-account        required        pam_unix.so
-session        required        pam_unix.so
-session        required        pam_systemd.so
diff --git a/maschinenplatzpi/etc/systemd/system/cage@.service b/maschinenplatzpi/etc/systemd/system/cage@.service
deleted file mode 100644 (file)
index 27f7c4c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[Unit]
-Description=Cage Wayland compositor on %I
-After=systemd-user-sessions.service plymouth-quit-wait.service
-Before=graphical.target
-ConditionPathExists=/dev/tty0
-Wants=dbus.socket systemd-logind.service
-After=dbus.socket systemd-logind.service
-Conflicts=getty@%i.service
-After=getty@%i.service
-
-[Service]
-Type=simple
-Environment="XKB_DEFAULT_OPTIONS=numpad:mac"
-ExecStart=/usr/bin/cage /usr/bin/qiosk file:///home/pi/index.html
-Restart=always
-User=pi
-UtmpIdentifier=%I
-UtmpMode=user
-TTYPath=/dev/%I
-TTYReset=yes
-TTYVHangup=yes
-TTYVTDisallocate=yes
-StandardInput=tty-fail
-PAMName=cage
-
-[Install]
-WantedBy=graphical.target
-Alias=display-manager.service
-DefaultInstance=tty7
diff --git a/maschinenplatzpi/etc/systemd/system/default.target b/maschinenplatzpi/etc/systemd/system/default.target
deleted file mode 120000 (symlink)
index cf9fa51..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/systemd/system/graphical.target
\ No newline at end of file
diff --git a/maschinenplatzpi/etc/systemd/system/getty.target.wants/getty@tty1.service b/maschinenplatzpi/etc/systemd/system/getty.target.wants/getty@tty1.service
new file mode 120000 (symlink)
index 0000000..7bfe080
--- /dev/null
@@ -0,0 +1 @@
+/usr/lib/systemd/system/getty@.service
\ No newline at end of file
diff --git a/maschinenplatzpi/etc/systemd/system/getty@tty1.service.d/autologin.conf b/maschinenplatzpi/etc/systemd/system/getty@tty1.service.d/autologin.conf
new file mode 100644 (file)
index 0000000..87dd2db
--- /dev/null
@@ -0,0 +1,3 @@
+[Service]
+ExecStart=
+ExecStart=-/usr/bin/agetty --autologin pi --noclear %I $TERM
diff --git a/maschinenplatzpi/etc/systemd/system/graphical.target.wants/cage@tty1.service b/maschinenplatzpi/etc/systemd/system/graphical.target.wants/cage@tty1.service
deleted file mode 120000 (symlink)
index 396bbad..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/etc/systemd/system/cage@.service
\ No newline at end of file
diff --git a/maschinenplatzpi/home/pi/.bash_profile b/maschinenplatzpi/home/pi/.bash_profile
new file mode 100644 (file)
index 0000000..eaa9338
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# ~/.bash_profile
+#
+
+[[ -f ~/.bashrc ]] && . ~/.bashrc
+
+# On first virtual console, try to start sway:
+if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]
+then
+    export XKB_DEFAULT_OPTIONS="numpad:mac"
+    exec cage qiosk file:///home/pi/index.html
+fi