From: Ben Gras Date: Tue, 3 May 2005 08:58:18 +0000 (+0000) Subject: . Moved sysenv to /bin (as well), used to read some boot parameters X-Git-Tag: v3.1.0~890 X-Git-Url: http://zhaoyanbai.com/repos/man.rndc.html?a=commitdiff_plain;h=efa2322895c6e1a5e1062c219e8bea9359ea584c;p=minix.git . Moved sysenv to /bin (as well), used to read some boot parameters in /etc/rc before /usr is mounted . fixed ps.c compile breakage (MM_PROC_NR rename) . made setup.sh a little less floppy-centric (cosmetic) . removed ps binary from cvs (whoops!) --- diff --git a/commands/ps/ps b/commands/ps/ps deleted file mode 100755 index db6d79b4c..000000000 Binary files a/commands/ps/ps and /dev/null differ diff --git a/commands/ps/ps.c b/commands/ps/ps.c index e8a6bd27c..826eddcf6 100644 --- a/commands/ps/ps.c +++ b/commands/ps/ps.c @@ -223,7 +223,7 @@ struct pstat *bufp; if (bufp->ps_state != S_STATE) return task; blkstr = "?"; - if (bufp->ps_recv == MM_PROC_NR) { + if (bufp->ps_recv == PM_PROC_NR) { if (bufp->ps_mflags & PAUSED) blkstr = "pause"; else if (bufp->ps_mflags & WAITING) @@ -318,7 +318,7 @@ char *argv[]; err("Can't get kernel proc table from /dev/kmem"); /* Get mm/fs process tables */ - if (addrread(memfd, ps_proc[nr_tasks + MM_PROC_NR].p_memmap[D].mem_phys, + if (addrread(memfd, ps_proc[nr_tasks + PM_PROC_NR].p_memmap[D].mem_phys, psinfo.mproc, (char *) ps_mproc, nr_procs * sizeof(ps_mproc[0])) != nr_procs * sizeof(ps_mproc[0])) diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index 3687c3db1..ed244fb43 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -261,7 +261,7 @@ else fi echo " -Migrating from floppy to disk... +Migrating to disk... " mkfs /dev/$usr @@ -313,17 +313,17 @@ Copying $fdroot to /dev/$root mkfs -B 1024 /dev/$root || exit mount /dev/$root /mnt || exit -if [ $thisroot = /dev/ram ] +if [ -d /boot ] then + # Running from the floppy itself (or installation CD). + cpdir -vx / /mnt || exit + chmod 555 /mnt/usr +else # Running from the RAM disk, root image is on a floppy. mount $fdroot /root || exit cpdir -v /root /mnt || exit umount $fdroot || exit cpdir -f /dev /mnt/dev # Copy any extra MAKEDEV'd devices -else - # Running from the floppy itself. - cpdir -vx / /mnt || exit - chmod 555 /mnt/usr fi # Change /etc/fstab. @@ -334,10 +334,6 @@ root=/dev/$root ${swap:+swap=/dev/$swap} usr=/dev/$usr" - # How to install further? -echo >/mnt/etc/issue "\ -Login as root and run 'setup /usr' to install floppy sets." - # National keyboard map. test -n "$keymap" && cp -p "/usr/lib/keymaps/$keymap.map" /mnt/etc/keymap @@ -359,10 +355,12 @@ echo "Second level file system block cache set to $cache kb." if [ $cache -eq 0 ]; then cache=; else cache="ramsize=$cache"; fi # Make bootable. -installboot -d /dev/$root /usr/mdec/bootblock /boot >/dev/null || exit +installboot -d /dev/$root /usr/mdec/bootblock /boot/boot >/dev/null || exit edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; save" || exit +sync echo " -Please insert the installation ROOT floppy and type 'halt' to exit Minix. +Please type 'halt' to exit Minix. You can type 'boot $primary' to try the newly installed Minix system. See \"TESTING\" in the usage manual." + diff --git a/commands/simple/Makefile b/commands/simple/Makefile index 92bb2430a..ea146f260 100755 --- a/commands/simple/Makefile +++ b/commands/simple/Makefile @@ -959,6 +959,7 @@ install: \ /usr/bin/sync \ /usr/bin/synctree \ /usr/bin/sysenv \ + /bin/sysenv \ /usr/bin/tail \ /usr/bin/tar \ /usr/bin/tcpd \ @@ -1409,6 +1410,9 @@ install: \ /usr/bin/synctree: synctree install -cs -o bin $? $@ +/bin/sysenv: sysenv + install -cs -o bin $? $@ + /usr/bin/sysenv: sysenv install -cs -o bin $? $@