From: Ben Gras Date: Wed, 24 Aug 2005 07:33:13 +0000 (+0000) Subject: Added rc.cd that gets executed when starting from CD. X-Git-Tag: v3.1.0~297 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=87732bd6e069888507ff5d14cf1f0586af11349f;p=minix.git Added rc.cd that gets executed when starting from 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 .