• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/busybox/examples/var_service/getty_tty1/
1#!/bin/sh
2
3ttyname=`tty`
4ttybase="${ttyname%%[0123456789]*}"     # strip numeric tail
5
6if test "$ttybase" = "/dev/tty"; then
7	tail="${ttyname:8}"
8	echo "* Setting terminal device's owner to $LOGIN_UID:$LOGIN_GID"
9	chown "$LOGIN_UID:$LOGIN_GID" "/dev/vcs$tail" "/dev/vcsa$tail"
10fi
11# We can do this also, but login does it itself
12# chown "$LOGIN_UID:$LOGIN_GID" "$ttyname"
13