From 87732bd6e069888507ff5d14cf1f0586af11349f Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 24 Aug 2005 07:33:13 +0000 Subject: [PATCH] Added rc.cd that gets executed when starting from CD. --- etc/Makefile | 2 +- etc/rc.cd | 4 ++++ etc/usr/rc | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 etc/rc.cd diff --git a/etc/Makefile b/etc/Makefile index 2b8acf9c9..e8371fa15 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,7 +1,7 @@ ETC=/etc/ USRETC=/usr/etc/ -FILES1=fstab group hostname.file inet.conf motd mtab passwd profile protocols rc services termcap ttytab utmp +FILES1=fstab group hostname.file inet.conf motd mtab passwd profile protocols rc services termcap ttytab utmp rc.cd FILES2=shadow FILES3=daily dhcptags.conf rc diff --git a/etc/rc.cd b/etc/rc.cd new file mode 100644 index 000000000..1be8b6acf --- /dev/null +++ b/etc/rc.cd @@ -0,0 +1,4 @@ +#!/bin/sh + +cd ~root || exit +echo 'set dir=/tmp' >>.exrc diff --git a/etc/usr/rc b/etc/usr/rc index 787a0fe5f..96c053057 100644 --- a/etc/usr/rc +++ b/etc/usr/rc @@ -94,7 +94,7 @@ start) # start only network drivers that are in use for driver in rtl8139 fxp dpeth dp8390 do - if grep " $driver " /etc/inet.conf > /dev/null + if grep " $driver " /etc/inet.conf > /dev/null 2>&1 then eval arg=\$${driver}_arg up $driver "$arg" @@ -116,6 +116,7 @@ start) # (and cron unnecessary then so..) if [ ! -f /CD ] then daemonize cron + else . /etc/rc.cd fi echo . -- 2.44.0