#!/bin/sh

# In order to give proper access to the tty, we need to locate the device
# corresponding to the console we are actually using.

console=
if ! [ -f /var/run/console-device ]; then
	tty > /var/run/console-device
fi

# Some other session may have it as ctty. Steal it from them
exec /sbin/steal-ctty $(cat /var/run/console-device) "$@"
