reboot &c should chdir("/") (Re: Problem with reboot and umount)

reboot &c should chdir("/") (Re: Problem with reboot and umount)

Post by Ian Jacks » Tue, 15 Mar 1994 03:55:38





> ...   But I think YOU (the person that is shuting down
>the system) are the only one that has to make sure not being in /home; all
>other processes that probably use that partition are supposed to be killed
>before any attempt to umount it.

>Write a shell-script that does `cd /' before `reboot'

I don't have the source to reboot etc. lying around, but it seems
clear to me that it should do the chdir itself, before trying to
unmount the partitions.

I'd consider it a bug if it doesn't.

Incidentally, it doesn't on my system, but the copy of reboot I have
is rather old.

--


2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238

 
 
 

reboot &c should chdir("/") (Re: Problem with reboot and umount)

Post by Simon Ferre » Tue, 15 Mar 1994 19:36:55





>> ...   But I think YOU (the person that is shuting down
>>the system) are the only one that has to make sure not being in /home; all
>>other processes that probably use that partition are supposed to be killed
>>before any attempt to umount it.

>>Write a shell-script that does `cd /' before `reboot'
>I don't have the source to reboot etc. lying around, but it seems
>clear to me that it should do the chdir itself, before trying to
>unmount the partitions.
>I'd consider it a bug if it doesn't.
>Incidentally, it doesn't on my system, but the copy of reboot I have
>is rather old.

I got around this problem by putting cd / into /etc/brc which does the
cd / before it unmounts everything.. it seems to work fine...

--

Floccinaucinihilipilification: the action or habit of estimating as
-----------------------------  worthless.

 
 
 

reboot &c should chdir("/") (Re: Problem with reboot and umount)

Post by Michael Horwa » Wed, 16 Mar 1994 09:15:05


[previous poster]
: >Write a shell-script that does `cd /' before `reboot'

: I don't have the source to reboot etc. lying around, but it seems
: clear to me that it should do the chdir itself, before trying to
: unmount the partitions.

: I'd consider it a bug if it doesn't.

: Incidentally, it doesn't on my system, but the copy of reboot I have
: is rather old.



: 2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238

I noticed this long ago and thought it had been changed soon after.  Hmm...

If people can't do it themselves, send me mail and I will send you both
source and a binary that works on my system.

--


Twin Cities area Internet Access:  612-941-9177 for more info

 
 
 

1. inetd bug? no chdir("/"); ???

Solaris 2.5.1:

Okay, I know that by default one of the operations a daemon should do is
either chdir to / or to some directory where it should run.  I recently
ran into a problem where I was in a particular directory and I killed and
restarted inetd.  Now, inetd's cwd *stayed* in that directory.  The
problem showed up when that directory was removed and processes were
being spawned with a non-existant working directory.  After some time I
finally used /usr/proc/bin/pwdx on inetd and saw the problem.

Is this not a bug?  Should inetd not change to a sane directory as part
of it's daemonization?

Comments?  Sun?

--
Michael Douglass
Texas Networking, Inc.

 "The past is a foreign country; they do things differently there."
      L. P. Hartley, British author. The Go-Between, Prologue (1953).

2. Mitsumi FX001D - no boot disk works!

3. my PC doesn't reboot after "reboot" or "ctrl-alt-del"

4. Extending a LV

5. Type "(", ")" and "{", "}" in X...

6. Brother HL-1040 printer

7. "umount: /usr: device is busy" on reboot...

8. Virtual Hosts with .htaccess & mod_rewrite?

9. How to "rcp"/"rsh" as "root"?

10. "WaveRunner"/"Linux"/"OS/2 Warp"/"ISDN "

11. Netscape Enterprise Server: filtering ".." & "//"

12. Netscape Enterprise Server: Filtering ".." & "//"