From f8fb6c781814eb48e584334ff41c5ce8a962800e Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 02:59:46 +0000 Subject: [PATCH 01/22] openrc service --- res/ly-openrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 res/ly-openrc diff --git a/res/ly-openrc b/res/ly-openrc new file mode 100644 index 00000000..f4014cc6 --- /dev/null +++ b/res/ly-openrc @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +name="ly" +description="TUI display manager ly" + +depend() { + after agetty +} + +start() { + exec supervise-daemon ly --start --pidfile /run/${RC_SVCNAME}.pid --respawn-period 60 /sbin/agetty -- -nl /usr/bin/ly tty7 38400 linux +} From dafd57bba8217b20267c71380aa914c1a49f475f Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:02:51 +0000 Subject: [PATCH 02/22] Update readme.md --- readme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/readme.md b/readme.md index fa5b09e2..f05e6f92 100644 --- a/readme.md +++ b/readme.md @@ -80,6 +80,25 @@ disable getty on Ly's tty to prevent "login" from spawning on top of it sudo systemctl disable getty@tty2.service ``` +### OpenRC + +clone, compile and test (tty7 by default). +Install Ly and the provided openrc service +``` +sudo make install-openrc +``` + +Enable the service +``` +sudo rc-update add ly +``` + +You can edit the tty in which ly will start in the service script. +If you choose a tty that already has a login/getty running you have to disable the getty so it doesn't respawn on top of ly +``` +sudo rc-update del agetty.tty1 +``` + ## Configuration You can find all the configuration in `/etc/ly/config.ini`. The file is commented, and includes the default values. From 376c528ec1cdca2f10fdc604f03f9a58fc6adf56 Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:21:25 +0000 Subject: [PATCH 03/22] Update ly-openrc --- res/ly-openrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/ly-openrc b/res/ly-openrc index f4014cc6..4c921265 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -8,5 +8,8 @@ depend() { } start() { - exec supervise-daemon ly --start --pidfile /run/${RC_SVCNAME}.pid --respawn-period 60 /sbin/agetty -- -nl /usr/bin/ly tty7 38400 linux + TTY=tty7 + BAUD=38400 + TERM=linux + exec supervise-daemon ly --start --pidfile /run/${RC_SVCNAME}.pid --respawn-period 60 /sbin/agetty -- -nl /usr/bin/ly $TTY $BAUD $TERM } From f424833af90341a3729674155ccf25010605a0d5 Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:29:59 +0000 Subject: [PATCH 04/22] openrc service --- makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makefile b/makefile index f8cc6ed6..f0898cb9 100644 --- a/makefile +++ b/makefile @@ -92,6 +92,10 @@ installnoconf: $(BIND)/$(NAME) @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d +installopenrc: + @echo "installing openrc service" + @install -DZ $(RESD)/ly-openrc -m 755 -t ${DESTDIR}/etc/init.d/${NAME} + uninstall: @echo "uninstalling" @rm -rf ${DESTDIR}/etc/ly From 0227e1bc16bd385fa68e4fb98911ea08cb8642b2 Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:32:29 +0000 Subject: [PATCH 05/22] Update makefile --- makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/makefile b/makefile index f0898cb9..7179770b 100644 --- a/makefile +++ b/makefile @@ -103,6 +103,7 @@ uninstall: @rm -f ${DESTDIR}/usr/bin/ly @rm -f ${DESTDIR}/usr/lib/systemd/system/ly.service @rm -f ${DESTDIR}/etc/pam.d/ly + @rm -f ${DESTDIR}/etc/init.d/${NAME} clean: @echo "cleaning" From 20764d3534467902b7d562b8879cc9c747ddb708 Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:36:27 +0000 Subject: [PATCH 06/22] Update readme.md --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index f05e6f92..30d7014a 100644 --- a/readme.md +++ b/readme.md @@ -82,10 +82,10 @@ sudo systemctl disable getty@tty2.service ### OpenRC -clone, compile and test (tty7 by default). +clone, compile and test. Install Ly and the provided openrc service ``` -sudo make install-openrc +sudo make install installopenrc ``` Enable the service @@ -93,7 +93,7 @@ Enable the service sudo rc-update add ly ``` -You can edit the tty in which ly will start in the service script. +You can edit which tty ly will start on in the service script. If you choose a tty that already has a login/getty running you have to disable the getty so it doesn't respawn on top of ly ``` sudo rc-update del agetty.tty1 From fa40a6fa5138d040d5f00bd68375493577b498eb Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 17 May 2022 04:45:55 +0000 Subject: [PATCH 07/22] Update makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 7179770b..c086a28e 100644 --- a/makefile +++ b/makefile @@ -94,7 +94,7 @@ installnoconf: $(BIND)/$(NAME) installopenrc: @echo "installing openrc service" - @install -DZ $(RESD)/ly-openrc -m 755 -t ${DESTDIR}/etc/init.d/${NAME} + @install -DZ $(RESD)/ly-openrc -m 755 -T ${DESTDIR}/etc/init.d/${NAME} uninstall: @echo "uninstalling" From f45197cfd0bb579e94676639a0bdcf26be94a459 Mon Sep 17 00:00:00 2001 From: Jonathan <78560204+wncry@users.noreply.github.com> Date: Tue, 17 May 2022 14:16:34 -0400 Subject: [PATCH 08/22] fixed spelling capitalized an uncapitalized letter so that the capitalization would be consistent :) --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 30d7014a..f598d72e 100644 --- a/readme.md +++ b/readme.md @@ -82,7 +82,7 @@ sudo systemctl disable getty@tty2.service ### OpenRC -clone, compile and test. +Clone, compile and test. Install Ly and the provided openrc service ``` sudo make install installopenrc From f05252ec77e98fef1dc7c9bcb9fd0464ab5e0570 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Thu, 7 Jul 2022 15:43:02 -0700 Subject: [PATCH 09/22] OpenRC script --- res/ly-openrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 res/ly-openrc diff --git a/res/ly-openrc b/res/ly-openrc new file mode 100644 index 00000000..3731580f --- /dev/null +++ b/res/ly-openrc @@ -0,0 +1,28 @@ +#! /sbin/openrc-run + +name="ly" +description="TUI Display Manager" + +supervisor=supervise-daemon +respawn-period=60 +pidfile=/run/"${RC_SVCNAME}.pid" + +depend() { + after agetty +} + +start() { + TTY=tty2 + BAUD=38400 + TERM=linux + + if [ -x /sbin/getty -o -x /bin/getty ]; + then + GETTY=/sbin/getty + elif [ -x /sbin/getty -o -x /bin/getty ]; + then + GETTY=/sbin/agetty + fi + + exec setsid ${GETTY} -nl /usr/bin/ly "${TTY}" "${BAUD}" "${TERM}" +} From d5db6b8a2fb0deb52c0d9cc2daec347a0cadadbf Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Fri, 8 Jul 2022 01:00:21 -0700 Subject: [PATCH 10/22] Fix respawn period typo --- res/ly-openrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/ly-openrc b/res/ly-openrc index 3731580f..36065a80 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -4,7 +4,7 @@ name="ly" description="TUI Display Manager" supervisor=supervise-daemon -respawn-period=60 +respawn_period=60 pidfile=/run/"${RC_SVCNAME}.pid" depend() { From d94132e99773d290803c98534a8328f264189855 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Fri, 8 Jul 2022 01:47:23 -0700 Subject: [PATCH 11/22] Fixed process locking of service --- res/ly-openrc | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/res/ly-openrc b/res/ly-openrc index 36065a80..72c310e2 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -7,22 +7,16 @@ supervisor=supervise-daemon respawn_period=60 pidfile=/run/"${RC_SVCNAME}.pid" +# tty to spawn ly in +## Make sure this corresponds with the tty in /etc/ly/config.ini +TTY=tty7 +TERM=linux +BAUD=38400 +command="/sbin/agetty" +command_args_foreground="-nl /usr/bin/ty ${TTY} ${BAUD} ${TERM}" + depend() { after agetty -} - -start() { - TTY=tty2 - BAUD=38400 - TERM=linux - - if [ -x /sbin/getty -o -x /bin/getty ]; - then - GETTY=/sbin/getty - elif [ -x /sbin/getty -o -x /bin/getty ]; - then - GETTY=/sbin/agetty - fi - - exec setsid ${GETTY} -nl /usr/bin/ly "${TTY}" "${BAUD}" "${TERM}" + provide display-manager + want elogind } From 103241e9b28114624d93bac309a66a96f60552b0 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Fri, 8 Jul 2022 03:35:23 -0700 Subject: [PATCH 12/22] Added tty pull from conf file. --- res/ly-openrc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/res/ly-openrc b/res/ly-openrc index 72c310e2..5663e759 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -3,16 +3,32 @@ name="ly" description="TUI Display Manager" +## Supervisor daemon supervisor=supervise-daemon respawn_period=60 pidfile=/run/"${RC_SVCNAME}.pid" -# tty to spawn ly in -## Make sure this corresponds with the tty in /etc/ly/config.ini -TTY=tty7 +## Check for getty or agetty +if [ -x /sbin/getty ] || [ -x /bin/getty ]; +then + # busybox + commandB="/sbin/getty" +elif [ -x /sbin/getty ] || [ -x /bin/agetty ]; +then + # util-linux + commandUL="/sbin/agetty" +fi + +## Get the tty from the conf file +CONFTTY=$(cat /etc/ly/conf.ini | grep tty | grep -v '#' | sed -e 's/tty = //' | sed -e 's/ //') + +## The execution vars +# If CONFTTY is empty the default to 2 +TTY=${CONFTTY:-"2"} TERM=linux BAUD=38400 -command="/sbin/agetty" +# If we don't have getty then we should have agetty +command=${commandB:-$commandUL} command_args_foreground="-nl /usr/bin/ty ${TTY} ${BAUD} ${TERM}" depend() { From 72c10f5e0059c1e7a0b3e28bb25160a8dff73f29 Mon Sep 17 00:00:00 2001 From: MadcowOG <88654251+MadcowOG@users.noreply.github.com> Date: Fri, 8 Jul 2022 10:39:10 +0000 Subject: [PATCH 13/22] Small typo --- res/ly-openrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/ly-openrc b/res/ly-openrc index 5663e759..f0395fcf 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -23,7 +23,7 @@ fi CONFTTY=$(cat /etc/ly/conf.ini | grep tty | grep -v '#' | sed -e 's/tty = //' | sed -e 's/ //') ## The execution vars -# If CONFTTY is empty the default to 2 +# If CONFTTY is empty then default to 2 TTY=${CONFTTY:-"2"} TERM=linux BAUD=38400 From 86e13dfe62d162916f87b021fcf52b4728fe92f8 Mon Sep 17 00:00:00 2001 From: MadcowOG <88654251+MadcowOG@users.noreply.github.com> Date: Fri, 8 Jul 2022 10:42:58 +0000 Subject: [PATCH 14/22] Small typo --- res/ly-openrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/ly-openrc b/res/ly-openrc index f0395fcf..f82ec537 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -20,7 +20,7 @@ then fi ## Get the tty from the conf file -CONFTTY=$(cat /etc/ly/conf.ini | grep tty | grep -v '#' | sed -e 's/tty = //' | sed -e 's/ //') +CONFTTY=$(cat /etc/ly/config.ini | grep tty | grep -v '#' | sed -e 's/tty = //' | sed -e 's/ //') ## The execution vars # If CONFTTY is empty then default to 2 From 7ba8b88f3ef9329434f206e44833d70f3994e543 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Fri, 8 Jul 2022 12:56:00 -0700 Subject: [PATCH 15/22] Added tty to TTY var. Fixed typo in ly call. --- res/ly-openrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/ly-openrc b/res/ly-openrc index f82ec537..199ee7bd 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -24,12 +24,12 @@ CONFTTY=$(cat /etc/ly/config.ini | grep tty | grep -v '#' | sed -e 's/tty = //' ## The execution vars # If CONFTTY is empty then default to 2 -TTY=${CONFTTY:-"2"} +TTY="tty${CONFTTY:-'2'}" TERM=linux BAUD=38400 # If we don't have getty then we should have agetty command=${commandB:-$commandUL} -command_args_foreground="-nl /usr/bin/ty ${TTY} ${BAUD} ${TERM}" +command_args_foreground="-nl /usr/bin/ly ${TTY} ${BAUD} ${TERM}" depend() { after agetty From cf3a87c0b7074d00f1593cc9bc2c6224ee34899e Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Sat, 9 Jul 2022 01:42:30 +0000 Subject: [PATCH 16/22] Fixes Fixed typo in line 16: /sbin/getty > /sbin/agetty Better CONFTTY command Change ${var} to just $var --- res/ly-openrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/ly-openrc b/res/ly-openrc index 199ee7bd..ad019580 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -1,4 +1,4 @@ -#! /sbin/openrc-run +#!/sbin/openrc-run name="ly" description="TUI Display Manager" @@ -13,14 +13,14 @@ if [ -x /sbin/getty ] || [ -x /bin/getty ]; then # busybox commandB="/sbin/getty" -elif [ -x /sbin/getty ] || [ -x /bin/agetty ]; +elif [ -x /sbin/agetty ] || [ -x /bin/agetty ]; then # util-linux commandUL="/sbin/agetty" fi ## Get the tty from the conf file -CONFTTY=$(cat /etc/ly/config.ini | grep tty | grep -v '#' | sed -e 's/tty = //' | sed -e 's/ //') +CONFTTY=$(cat /etc/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p') ## The execution vars # If CONFTTY is empty then default to 2 @@ -29,7 +29,7 @@ TERM=linux BAUD=38400 # If we don't have getty then we should have agetty command=${commandB:-$commandUL} -command_args_foreground="-nl /usr/bin/ly ${TTY} ${BAUD} ${TERM}" +command_args_foreground="-nl /usr/bin/ly $TTY $BAUD $TERM" depend() { after agetty From 988c750b6a18b53821b4b486f2b09c869a4f119f Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 12 Jul 2022 05:21:13 +0000 Subject: [PATCH 17/22] Update ly-openrc --- res/ly-openrc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/res/ly-openrc b/res/ly-openrc index 4c921265..8b137891 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -1,15 +1 @@ -#!/sbin/openrc-run -name="ly" -description="TUI display manager ly" - -depend() { - after agetty -} - -start() { - TTY=tty7 - BAUD=38400 - TERM=linux - exec supervise-daemon ly --start --pidfile /run/${RC_SVCNAME}.pid --respawn-period 60 /sbin/agetty -- -nl /usr/bin/ly $TTY $BAUD $TERM -} From 33041d26e96bc927c74f3a6ed79ab733a51c2ce8 Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 12 Jul 2022 05:22:25 +0000 Subject: [PATCH 18/22] Delete ly-openrc --- res/ly-openrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 res/ly-openrc diff --git a/res/ly-openrc b/res/ly-openrc deleted file mode 100644 index 8b137891..00000000 --- a/res/ly-openrc +++ /dev/null @@ -1 +0,0 @@ - From 3a44a8f8333438b0966af78e7d925c6edbe87f6f Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Tue, 12 Jul 2022 05:32:04 +0000 Subject: [PATCH 19/22] Update readme.md --- readme.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 6df4256e..1b1a70fc 100644 --- a/readme.md +++ b/readme.md @@ -91,7 +91,8 @@ sudo systemctl disable getty@tty2.service ### OpenRC Clone, compile and test. -Install Ly and the provided openrc service + +Install Ly and the provided OpenRC service ``` sudo make install installopenrc ``` @@ -101,10 +102,11 @@ Enable the service sudo rc-update add ly ``` -You can edit which tty ly will start on in the service script. -If you choose a tty that already has a login/getty running you have to disable the getty so it doesn't respawn on top of ly +You can edit which tty Ly will start on by editing the `tty` option in the configuration file. + +If you choose a tty that already has a login/getty running (has a basic login prompt), then you have to disable the getty so it doesn't respawn on top of ly ``` -sudo rc-update del agetty.tty1 +sudo rc-update del agetty.tty2 ``` ## Arch Linux Installation From fc69b40befa32e4fb7ba29cdad859ef185ce6b20 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Mon, 11 Jul 2022 23:46:14 -0700 Subject: [PATCH 20/22] independent install for each service, and documentation to accomodate. --- makefile | 5 ++++- readme.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index c086a28e..80e256c8 100644 --- a/makefile +++ b/makefile @@ -89,9 +89,12 @@ installnoconf: $(BIND)/$(NAME) @install -DZ $(RESD)/wsetup.sh -t $(DATADIR) @install -dZ $(DATADIR)/lang @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang - @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d +installsystemd: + @echo "installing systemd service" + @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system + installopenrc: @echo "installing openrc service" @install -DZ $(RESD)/ly-openrc -m 755 -T ${DESTDIR}/etc/init.d/${NAME} diff --git a/readme.md b/readme.md index 1b1a70fc..87f0142f 100644 --- a/readme.md +++ b/readme.md @@ -74,7 +74,7 @@ sudo make run Install Ly and the provided systemd service file ``` -sudo make install +sudo make install installsystemd ``` Enable the service From fbcceb4689fbb045c8213172ec683acd24f56370 Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Sat, 16 Jul 2022 02:14:18 -0700 Subject: [PATCH 21/22] Oops removed service install from install. Also added tiny clarification of installing ly within install and installnoconf. --- makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 80e256c8..6b9177d6 100644 --- a/makefile +++ b/makefile @@ -70,7 +70,7 @@ leakgrind: $(BIND)/$(NAME) @less valgrind.log install: $(BIND)/$(NAME) - @echo "installing" + @echo "installing ly" @install -dZ ${DESTDIR}/etc/ly @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin @install -DZ $(RESD)/config.ini -t ${DESTDIR}/etc/ly @@ -78,11 +78,10 @@ install: $(BIND)/$(NAME) @install -DZ $(RESD)/wsetup.sh -t $(DATADIR) @install -dZ $(DATADIR)/lang @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang - @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d installnoconf: $(BIND)/$(NAME) - @echo "installing without the configuration file" + @echo "installing ly without the configuration file" @install -dZ ${DESTDIR}/etc/ly @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin @install -DZ $(RESD)/xsetup.sh -t $(DATADIR) From 3641a6b61573bfc92bbbe1159e88004f5b5ea9db Mon Sep 17 00:00:00 2001 From: Cavernosa <42952107+Cavernosa@users.noreply.github.com> Date: Sat, 16 Jul 2022 12:55:26 +0000 Subject: [PATCH 22/22] Fix error, TTY was printing tty'2' instead of tty2 --- res/ly-openrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/ly-openrc b/res/ly-openrc index ad019580..7021829f 100644 --- a/res/ly-openrc +++ b/res/ly-openrc @@ -24,7 +24,7 @@ CONFTTY=$(cat /etc/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p') ## The execution vars # If CONFTTY is empty then default to 2 -TTY="tty${CONFTTY:-'2'}" +TTY="tty${CONFTTY:-2}" TERM=linux BAUD=38400 # If we don't have getty then we should have agetty