]> Zhao Yanbai Git Server - minix.git/commitdiff
Added rc.cd that gets executed when starting from CD.
authorBen Gras <ben@minix3.org>
Wed, 24 Aug 2005 07:33:13 +0000 (07:33 +0000)
committerBen Gras <ben@minix3.org>
Wed, 24 Aug 2005 07:33:13 +0000 (07:33 +0000)
etc/Makefile
etc/rc.cd [new file with mode: 0644]
etc/usr/rc

index 2b8acf9c9ba0a79ac5a5d18cb9d8b5c1311f200c..e8371fa1546b1e689efe2dc27d413f2d9cde0fcd 100644 (file)
@@ -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 (file)
index 0000000..1be8b6a
--- /dev/null
+++ b/etc/rc.cd
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ~root || exit
+echo 'set dir=/tmp' >>.exrc
index 787a0fe5fa2b57b553b142f5e3bbe5ac24a24d44..96c0530576bad3cae059f5f06aae41cc16685882 100644 (file)
@@ -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 .