Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs
Remove the hack from syscons that added a /dev/vga node in DEVFS it broke root acces on ttyv0 because dev_mkdb screwed up.
This commit is contained in:
parent
5ecaf9a866
commit
c77c6e0cbb
5
etc/rc
5
etc/rc
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: rc,v 1.153 1998/09/07 17:18:36 cracauer Exp $
|
||||
# $Id: rc,v 1.154 1998/09/09 22:27:21 jraynard Exp $
|
||||
# From: @(#)rc 5.27 (Berkeley) 6/5/91
|
||||
|
||||
# System startup script run by init on autoboot
|
||||
@ -338,6 +338,9 @@ if [ "X${local_startup}" != X"NO" ]; then
|
||||
echo .
|
||||
fi
|
||||
|
||||
# Run rc.devfs if present to customify devfs
|
||||
[ -f /etc/rc.devfs ] && sh /etc/rc.devfs
|
||||
|
||||
# Do traditional (but rather obsolete) rc.local file if it exists.
|
||||
[ -f /etc/rc.local ] && sh /etc/rc.local
|
||||
|
||||
|
14
etc/rc.devfs
Normal file
14
etc/rc.devfs
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# If there is a global system configuration file, suck it in.
|
||||
if [ -f /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
|
||||
# Setup DEVFS, ie permisisons, links etc.
|
||||
|
||||
echo -n 'Setting up DEVFS: '
|
||||
ln -fs ttyv0 vga
|
||||
|
||||
echo '.'
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.275 1998/08/18 07:36:47 sos Exp $
|
||||
* $Id: syscons.c,v 1.276 1998/08/23 08:26:41 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -138,7 +138,6 @@ static scr_stat main_console;
|
||||
static scr_stat *console[MAXCONS];
|
||||
#ifdef DEVFS
|
||||
static void *sc_devfs_token[MAXCONS];
|
||||
static void *sc_vga_devfs_token;
|
||||
static void *sc_mouse_devfs_token;
|
||||
static void *sc_console_devfs_token;
|
||||
#endif
|
||||
@ -842,7 +841,6 @@ scattach(struct isa_device *dev)
|
||||
for (vc = 0; vc < MAXCONS; vc++)
|
||||
sc_devfs_token[vc] = devfs_add_devswf(&sc_cdevsw, vc, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc);
|
||||
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
|
||||
sc_mouse_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_MOUSE, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
|
||||
sc_console_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_CONSOLE, DV_CHR,
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.275 1998/08/18 07:36:47 sos Exp $
|
||||
* $Id: syscons.c,v 1.276 1998/08/23 08:26:41 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -138,7 +138,6 @@ static scr_stat main_console;
|
||||
static scr_stat *console[MAXCONS];
|
||||
#ifdef DEVFS
|
||||
static void *sc_devfs_token[MAXCONS];
|
||||
static void *sc_vga_devfs_token;
|
||||
static void *sc_mouse_devfs_token;
|
||||
static void *sc_console_devfs_token;
|
||||
#endif
|
||||
@ -842,7 +841,6 @@ scattach(struct isa_device *dev)
|
||||
for (vc = 0; vc < MAXCONS; vc++)
|
||||
sc_devfs_token[vc] = devfs_add_devswf(&sc_cdevsw, vc, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc);
|
||||
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
|
||||
sc_mouse_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_MOUSE, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
|
||||
sc_console_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_CONSOLE, DV_CHR,
|
||||
|
Loading…
Reference in New Issue
Block a user