Path: utzoo!attcan!uunet!munnari!uqcspe!qfagus!anvil!michi From: michi@anvil.oz (Michael Henning) Newsgroups: comp.unix.wizards Subject: run level Keywords: init, run level, sysadm Message-ID: <469@anvil.oz> Date: 26 May 89 07:16:40 GMT Organization: Anvil Designs Pty Ltd, Brisbane, Australia Lines: 17 I've stumbled across a problem regarding run levels. Basically, I am writing a program which I want to run only in single user mode (it does fancy things with raw device files). The problem is, how can I reliably detect what the current run level is (I need to be able to do this from within a normal user program, with root privileges). One idea I had was to check whether /etc/utmp is empty. This seems to work on Xenix systems, but also seems clumsy. Is there some elegant and reliable way (i.e. portable) of asking init at what run level it is ? Any help with this would be great. Mail me if you like, and I will summarize. Michi. -- | The opinions expressed are my own, not those of my employer. | | | | Michael (Michi) Henning | | - We have three Michaels here, that's why they call me Michi |