summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-07 10:41:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-07 10:41:48 +0000
commit20db58e37e32316fa308d5f15d18248aca8ae43a (patch)
tree3cc6e43fa813afcc58be1a70b6c98e075668d58a /mdk-stage1
parent4039c21e821703b840bc74dbefc0afe2fec444e0 (diff)
downloaddrakx-20db58e37e32316fa308d5f15d18248aca8ae43a.tar
drakx-20db58e37e32316fa308d5f15d18248aca8ae43a.tar.gz
drakx-20db58e37e32316fa308d5f15d18248aca8ae43a.tar.bz2
drakx-20db58e37e32316fa308d5f15d18248aca8ae43a.tar.xz
drakx-20db58e37e32316fa308d5f15d18248aca8ae43a.zip
nasty kernel now gives us weird PIDs, so we can't rely on this to detect if we are running
on a live box or not. So set testing to 0
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c5
-rw-r--r--mdk-stage1/stage1.c12
2 files changed, 5 insertions, 12 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 8d9035b33..58dc64bd8 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -56,7 +56,7 @@ char * env[] = {
*
*/
-int testing;
+int testing = 0;
int klog_pid;
@@ -445,9 +445,6 @@ int main(int argc, char **argv)
return 0;
}
- /* getpid() != 1 should work, by linuxrc tends to get a larger pid */
- testing = (getpid() > 50);
-
if (!testing) {
/* turn off screen blanking */
printf("\033[9;0]");
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 8306772b0..ffb782162 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -593,14 +593,10 @@ void finish_preparing(void)
int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)), char **env)
{
- if (getpid() > 50)
- set_param(MODE_TESTING);
- else {
- mkdir(SLASH_LOCATION, 0755);
- if (scall(mount("none", SLASH_LOCATION, "tmpfs", MS_MGC_VAL, NULL), "mount tmpfs"))
- fatal_error("Fatal error initializing.");
- mkdir(SLASH_LOCATION "/tmp", 0755);
- }
+ mkdir(SLASH_LOCATION, 0755);
+ if (scall(mount("none", SLASH_LOCATION, "tmpfs", MS_MGC_VAL, NULL), "mount tmpfs"))
+ fatal_error("Fatal error initializing.");
+ mkdir(SLASH_LOCATION "/tmp", 0755);
spawn_interactive();