Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix: chcon in service to prevent permission errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Dec 13, 2021
1 parent e62c990 commit 5ae68fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Before=rescue.service
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
ExecStart=/usr/bin/sh -c "sudo stty -F /dev/ttyUSB0 4800 istrip cs7 parenb -parodd brkint ignpar icrnl ixon ixany opost onlcr cread hupcl isig icanon echo echoe echok && /sbin/agetty -o '-p -- \\u' -c %I 4800 m1b-x80 $TERM"
ExecStart=/usr/bin/sh -c "chcon -t tty_device_t /dev/%I && sudo stty -F /dev//%I 4800 istrip cs7 parenb -parodd brkint ignpar icrnl ixon ixany opost onlcr cread hupcl isig icanon echo echoe echok && /sbin/agetty -o '-p -- \\u' -c %I 4800 m1b-x80 $TERM"
Type=idle
Restart=always
UtmpIdentifier=%I
Expand All @@ -168,7 +168,6 @@ SendSIGHUP=yes
[Install]
WantedBy=getty.target
EOT
$ sudo chcon -t tty_device_t /dev/ttyUSB0
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now minitel-getty@ttyUSB0
```
Expand Down

0 comments on commit 5ae68fe

Please sign in to comment.