From 78decbdb515f78864ad8144779cd453caacd7e90 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:14:55 +0200 Subject: services: Refactor agetty-tty? services --- services/agetty-generic/run | 7 ++++++- services/agetty-tty1/conf | 7 +++++++ services/agetty-tty1/run | 12 +----------- services/agetty-tty2/conf | 1 + services/agetty-tty2/run | 2 +- services/agetty-tty3/conf | 1 + services/agetty-tty3/run | 2 +- services/agetty-tty4/conf | 1 + services/agetty-tty4/run | 2 +- services/agetty-tty5/conf | 1 + services/agetty-tty5/run | 2 +- services/agetty-tty6/conf | 1 + services/agetty-tty6/run | 2 +- 13 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 services/agetty-tty1/conf mode change 100755 => 120000 services/agetty-tty1/run create mode 120000 services/agetty-tty2/conf create mode 120000 services/agetty-tty3/conf create mode 120000 services/agetty-tty4/conf create mode 120000 services/agetty-tty5/conf create mode 120000 services/agetty-tty6/conf diff --git a/services/agetty-generic/run b/services/agetty-generic/run index 9a34297..f6e625c 100755 --- a/services/agetty-generic/run +++ b/services/agetty-generic/run @@ -1,4 +1,7 @@ #!/bin/sh + +[ -r conf ] && . conf + tty=${PWD##*-} if [ -x /sbin/getty ]; then # busybox @@ -7,4 +10,6 @@ elif [ -x /sbin/agetty ]; then # util-linux GETTY=agetty fi -exec setsid $GETTY $tty 38400 linux + +exec setsid ${GETTY}${GETTY_ARGS:+ $GETTY_ARGS} \ + "${tty}" "${baud_rate}" "${term_name}" diff --git a/services/agetty-tty1/conf b/services/agetty-tty1/conf new file mode 100644 index 0000000..977d7ef --- /dev/null +++ b/services/agetty-tty1/conf @@ -0,0 +1,7 @@ +if [ -x /sbin/getty ]; then + # util-linux specific settings + GETTY_ARGS="--no-clear" +fi + +baud_rate=38400 +term_name=linux diff --git a/services/agetty-tty1/run b/services/agetty-tty1/run deleted file mode 100755 index dc01b10..0000000 --- a/services/agetty-tty1/run +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -tty=${PWD##*-} -if [ -x /sbin/getty ]; then - # busybox - GETTY=getty -elif [ -x /sbin/agetty ]; then - # util-linux - GETTY=agetty - GETTY_ARGS="--noclear" -fi -exec setsid $GETTY $GETTY_ARGS $tty 38400 linux diff --git a/services/agetty-tty1/run b/services/agetty-tty1/run new file mode 120000 index 0000000..26e72f0 --- /dev/null +++ b/services/agetty-tty1/run @@ -0,0 +1 @@ +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-tty2/conf b/services/agetty-tty2/conf new file mode 120000 index 0000000..7c3c642 --- /dev/null +++ b/services/agetty-tty2/conf @@ -0,0 +1 @@ +../agetty-tty1/conf \ No newline at end of file diff --git a/services/agetty-tty2/run b/services/agetty-tty2/run index 2ebc95f..26e72f0 120000 --- a/services/agetty-tty2/run +++ b/services/agetty-tty2/run @@ -1 +1 @@ -/etc/sv/agetty-generic/run \ No newline at end of file +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-tty3/conf b/services/agetty-tty3/conf new file mode 120000 index 0000000..7c3c642 --- /dev/null +++ b/services/agetty-tty3/conf @@ -0,0 +1 @@ +../agetty-tty1/conf \ No newline at end of file diff --git a/services/agetty-tty3/run b/services/agetty-tty3/run index 2ebc95f..26e72f0 120000 --- a/services/agetty-tty3/run +++ b/services/agetty-tty3/run @@ -1 +1 @@ -/etc/sv/agetty-generic/run \ No newline at end of file +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-tty4/conf b/services/agetty-tty4/conf new file mode 120000 index 0000000..7c3c642 --- /dev/null +++ b/services/agetty-tty4/conf @@ -0,0 +1 @@ +../agetty-tty1/conf \ No newline at end of file diff --git a/services/agetty-tty4/run b/services/agetty-tty4/run index 2ebc95f..26e72f0 120000 --- a/services/agetty-tty4/run +++ b/services/agetty-tty4/run @@ -1 +1 @@ -/etc/sv/agetty-generic/run \ No newline at end of file +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-tty5/conf b/services/agetty-tty5/conf new file mode 120000 index 0000000..7c3c642 --- /dev/null +++ b/services/agetty-tty5/conf @@ -0,0 +1 @@ +../agetty-tty1/conf \ No newline at end of file diff --git a/services/agetty-tty5/run b/services/agetty-tty5/run index 2ebc95f..26e72f0 120000 --- a/services/agetty-tty5/run +++ b/services/agetty-tty5/run @@ -1 +1 @@ -/etc/sv/agetty-generic/run \ No newline at end of file +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-tty6/conf b/services/agetty-tty6/conf new file mode 120000 index 0000000..7c3c642 --- /dev/null +++ b/services/agetty-tty6/conf @@ -0,0 +1 @@ +../agetty-tty1/conf \ No newline at end of file diff --git a/services/agetty-tty6/run b/services/agetty-tty6/run index 2ebc95f..26e72f0 120000 --- a/services/agetty-tty6/run +++ b/services/agetty-tty6/run @@ -1 +1 @@ -/etc/sv/agetty-generic/run \ No newline at end of file +../agetty-generic/run \ No newline at end of file -- cgit 1.4.1 From f6f0e1ccb0a7e15acad6509d2d87f0268bb65f6f Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:20:51 +0200 Subject: services: Refactor agetty-console --- services/agetty-console/conf | 2 ++ services/agetty-console/run | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 services/agetty-console/conf mode change 100755 => 120000 services/agetty-console/run diff --git a/services/agetty-console/conf b/services/agetty-console/conf new file mode 100644 index 0000000..abccdb5 --- /dev/null +++ b/services/agetty-console/conf @@ -0,0 +1,2 @@ +baud_rate=38400 +term_name=linux diff --git a/services/agetty-console/run b/services/agetty-console/run deleted file mode 100755 index 9fc6409..0000000 --- a/services/agetty-console/run +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -if [ -x /sbin/getty ]; then - GETTY=getty -elif [ -x /sbin/agetty ]; then - GETTY=agetty -fi -exec $GETTY console 38400 linux diff --git a/services/agetty-console/run b/services/agetty-console/run new file mode 120000 index 0000000..26e72f0 --- /dev/null +++ b/services/agetty-console/run @@ -0,0 +1 @@ +../agetty-generic/run \ No newline at end of file -- cgit 1.4.1 From 25f2e71801f1a48d6a1e496a0e4ff340f1bce505 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:23:14 +0200 Subject: services: Refactor agetty-serial --- services/agetty-serial/conf | 7 +++++++ services/agetty-serial/run | 4 +--- services/agetty-ttyAMA0/conf | 1 + services/agetty-ttyAMA0/run | 2 +- services/agetty-ttyS0/conf | 1 + services/agetty-ttyS0/run | 2 +- services/agetty-ttyUSB0/conf | 1 + services/agetty-ttyUSB0/run | 2 +- 8 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 services/agetty-serial/conf mode change 100755 => 120000 services/agetty-serial/run create mode 120000 services/agetty-ttyAMA0/conf create mode 120000 services/agetty-ttyS0/conf create mode 120000 services/agetty-ttyUSB0/conf diff --git a/services/agetty-serial/conf b/services/agetty-serial/conf new file mode 100644 index 0000000..7e064af --- /dev/null +++ b/services/agetty-serial/conf @@ -0,0 +1,7 @@ +if [ -x /sbin/getty ]; then + # util-linux specific settings + GETTY_ARGS="-8 -L" +fi + +baud_rate=115200 +term_name=vt100 diff --git a/services/agetty-serial/run b/services/agetty-serial/run deleted file mode 100755 index 58d795e..0000000 --- a/services/agetty-serial/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -tty=${PWD##*-} -exec setsid agetty -8 -L 115200 --noclear $tty vt100 diff --git a/services/agetty-serial/run b/services/agetty-serial/run new file mode 120000 index 0000000..26e72f0 --- /dev/null +++ b/services/agetty-serial/run @@ -0,0 +1 @@ +../agetty-generic/run \ No newline at end of file diff --git a/services/agetty-ttyAMA0/conf b/services/agetty-ttyAMA0/conf new file mode 120000 index 0000000..ba71d1c --- /dev/null +++ b/services/agetty-ttyAMA0/conf @@ -0,0 +1 @@ +../agetty-serial/conf \ No newline at end of file diff --git a/services/agetty-ttyAMA0/run b/services/agetty-ttyAMA0/run index bfaca3e..ffa62a5 120000 --- a/services/agetty-ttyAMA0/run +++ b/services/agetty-ttyAMA0/run @@ -1 +1 @@ -/etc/sv/agetty-serial/run \ No newline at end of file +../agetty-serial/run \ No newline at end of file diff --git a/services/agetty-ttyS0/conf b/services/agetty-ttyS0/conf new file mode 120000 index 0000000..ba71d1c --- /dev/null +++ b/services/agetty-ttyS0/conf @@ -0,0 +1 @@ +../agetty-serial/conf \ No newline at end of file diff --git a/services/agetty-ttyS0/run b/services/agetty-ttyS0/run index bfaca3e..ffa62a5 120000 --- a/services/agetty-ttyS0/run +++ b/services/agetty-ttyS0/run @@ -1 +1 @@ -/etc/sv/agetty-serial/run \ No newline at end of file +../agetty-serial/run \ No newline at end of file diff --git a/services/agetty-ttyUSB0/conf b/services/agetty-ttyUSB0/conf new file mode 120000 index 0000000..ba71d1c --- /dev/null +++ b/services/agetty-ttyUSB0/conf @@ -0,0 +1 @@ +../agetty-serial/conf \ No newline at end of file diff --git a/services/agetty-ttyUSB0/run b/services/agetty-ttyUSB0/run index bfaca3e..ffa62a5 120000 --- a/services/agetty-ttyUSB0/run +++ b/services/agetty-ttyUSB0/run @@ -1 +1 @@ -/etc/sv/agetty-serial/run \ No newline at end of file +../agetty-serial/run \ No newline at end of file -- cgit 1.4.1 From de26b56c6bd1057bfef351ba0bd27b4ede9457f0 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:29:57 +0200 Subject: services: use more relative symlinks --- services/agetty-console/finish | 2 +- services/agetty-serial/finish | 2 +- services/agetty-tty1/finish | 2 +- services/agetty-tty2/finish | 2 +- services/agetty-tty3/finish | 2 +- services/agetty-tty4/finish | 2 +- services/agetty-tty5/finish | 2 +- services/agetty-tty6/finish | 2 +- services/agetty-ttyAMA0/finish | 2 +- services/agetty-ttyS0/finish | 2 +- services/agetty-ttyUSB0/finish | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/services/agetty-console/finish b/services/agetty-console/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-console/finish +++ b/services/agetty-console/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-serial/finish b/services/agetty-serial/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-serial/finish +++ b/services/agetty-serial/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty1/finish b/services/agetty-tty1/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty1/finish +++ b/services/agetty-tty1/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty2/finish b/services/agetty-tty2/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty2/finish +++ b/services/agetty-tty2/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty3/finish b/services/agetty-tty3/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty3/finish +++ b/services/agetty-tty3/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty4/finish b/services/agetty-tty4/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty4/finish +++ b/services/agetty-tty4/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty5/finish b/services/agetty-tty5/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty5/finish +++ b/services/agetty-tty5/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-tty6/finish b/services/agetty-tty6/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-tty6/finish +++ b/services/agetty-tty6/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-ttyAMA0/finish b/services/agetty-ttyAMA0/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-ttyAMA0/finish +++ b/services/agetty-ttyAMA0/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-ttyS0/finish b/services/agetty-ttyS0/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-ttyS0/finish +++ b/services/agetty-ttyS0/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file diff --git a/services/agetty-ttyUSB0/finish b/services/agetty-ttyUSB0/finish index fa7eecd..ad464cb 120000 --- a/services/agetty-ttyUSB0/finish +++ b/services/agetty-ttyUSB0/finish @@ -1 +1 @@ -/etc/sv/agetty-generic/finish \ No newline at end of file +../agetty-generic/finish \ No newline at end of file -- cgit 1.4.1 From decca1b7a36e42f224edbbe065ba67440eba4ffd Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:35:04 +0200 Subject: services: uppercase configuration variables --- services/agetty-console/conf | 4 ++-- services/agetty-generic/run | 2 +- services/agetty-serial/conf | 4 ++-- services/agetty-tty1/conf | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/services/agetty-console/conf b/services/agetty-console/conf index abccdb5..c725133 100644 --- a/services/agetty-console/conf +++ b/services/agetty-console/conf @@ -1,2 +1,2 @@ -baud_rate=38400 -term_name=linux +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/services/agetty-generic/run b/services/agetty-generic/run index f6e625c..9f532b2 100755 --- a/services/agetty-generic/run +++ b/services/agetty-generic/run @@ -12,4 +12,4 @@ elif [ -x /sbin/agetty ]; then fi exec setsid ${GETTY}${GETTY_ARGS:+ $GETTY_ARGS} \ - "${tty}" "${baud_rate}" "${term_name}" + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/services/agetty-serial/conf b/services/agetty-serial/conf index 7e064af..5aba88f 100644 --- a/services/agetty-serial/conf +++ b/services/agetty-serial/conf @@ -3,5 +3,5 @@ if [ -x /sbin/getty ]; then GETTY_ARGS="-8 -L" fi -baud_rate=115200 -term_name=vt100 +BAUD_RATE=115200 +TERM_NAME=vt100 diff --git a/services/agetty-tty1/conf b/services/agetty-tty1/conf index 977d7ef..a2d4e8d 100644 --- a/services/agetty-tty1/conf +++ b/services/agetty-tty1/conf @@ -3,5 +3,5 @@ if [ -x /sbin/getty ]; then GETTY_ARGS="--no-clear" fi -baud_rate=38400 -term_name=linux +BAUD_RATE=38400 +TERM_NAME=linux -- cgit 1.4.1 From 0603ba4d1fb7ccc61e5a1f52810ab790acdc0043 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:36:16 +0200 Subject: services: -8 is available on getty too --- services/agetty-serial/conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/agetty-serial/conf b/services/agetty-serial/conf index 5aba88f..74a9364 100644 --- a/services/agetty-serial/conf +++ b/services/agetty-serial/conf @@ -1,6 +1,7 @@ +GETTY_ARGS="-L" if [ -x /sbin/getty ]; then # util-linux specific settings - GETTY_ARGS="-8 -L" + GETTY_ARGS="${GETTY_ARGS} -8" fi BAUD_RATE=115200 -- cgit 1.4.1 From ef7ad969f23668ad6a5f45981a19362524f376b2 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 17:37:42 +0200 Subject: services: getty -> agetty --- services/agetty-serial/conf | 2 +- services/agetty-tty1/conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/agetty-serial/conf b/services/agetty-serial/conf index 74a9364..b40bb22 100644 --- a/services/agetty-serial/conf +++ b/services/agetty-serial/conf @@ -1,5 +1,5 @@ GETTY_ARGS="-L" -if [ -x /sbin/getty ]; then +if [ -x /sbin/agetty ]; then # util-linux specific settings GETTY_ARGS="${GETTY_ARGS} -8" fi diff --git a/services/agetty-tty1/conf b/services/agetty-tty1/conf index a2d4e8d..19cbabb 100644 --- a/services/agetty-tty1/conf +++ b/services/agetty-tty1/conf @@ -1,4 +1,4 @@ -if [ -x /sbin/getty ]; then +if [ -x /sbin/agetty ]; then # util-linux specific settings GETTY_ARGS="--no-clear" fi -- cgit 1.4.1