1 diff -Nur simpleinit-msb-1.2/lib/pathnames.h simpleinit-msb-1.2-smgl/lib/pathnames.h
2 --- simpleinit-msb-1.2/lib/pathnames.h 2001-09-26 12:59:46.000000000 +0200
3 +++ simpleinit-msb-1.2-smgl/lib/pathnames.h 2004-02-20 14:33:35.000000000 +0100
5 #define _PATH_MTAB "/etc/mtab"
6 #define _PATH_PROC_MOUNTS "/proc/mounts"
7 #define _PATH_UMOUNT "/bin/umount"
8 -#define UMOUNT_ARGS "umount", "-a", "-t", "nodevfs,noproc"
9 +#define UMOUNT_ARGS "umount", "-a", "-t", "nodevfs,noproc,noramfs"
10 #define SWAPOFF_ARGS "swapoff", "-a"
12 /* used in login-utils/setpwnam.h and login-utils/islocal.c */
13 diff -Nur simpleinit-msb-1.2/login-utils/shutdown.c simpleinit-msb-1.2-smgl/login-utils/shutdown.c
14 --- simpleinit-msb-1.2/login-utils/shutdown.c 2001-09-26 12:59:46.000000000 +0200
15 +++ simpleinit-msb-1.2-smgl/login-utils/shutdown.c 2004-02-20 15:53:27.000000000 +0100
18 while (n < 100 && (mnt = getmntent(mtab))) {
19 if (strcmp (mnt->mnt_type, "devfs") == 0) continue;
20 + if (strcmp (mnt->mnt_type, "ramfs") == 0) continue;
21 mntlist[n++] = strdup(mnt->mnt_dir);
24 diff -Nur simpleinit-msb-1.2/login-utils/simpleinit.c simpleinit-msb-1.2-smgl/login-utils/simpleinit.c
25 --- simpleinit-msb-1.2/login-utils/simpleinit.c 2004-01-11 00:24:42.000000000 +0100
26 +++ simpleinit-msb-1.2-smgl/login-utils/simpleinit.c 2004-02-20 14:28:31.000000000 +0100
28 void sigquit_handler (int sig);
29 void userspace_sigquit_handler (int sig);
30 void sigterm_handler (int sig);
31 +void open_initctl_fifo (void);
32 +void sigusr_handler (int sig);
37 sigaction (SIGCHLD, &sa, NULL);
38 sa.sa_handler = userspace_sigquit_handler;
39 sigaction (SIGQUIT, &sa, NULL);
40 + sa.sa_handler = sigusr_handler;
41 + sigaction (SIGUSR1, &sa, NULL);
42 if (userspace) fix_userspace_paths(); else
44 sa.sa_handler = sigtstp_handler;
49 - if ( ( initctl_fd = open (initctl_name, O_RDWR|O_NONBLOCK, 0) ) < 0 ) {
50 - mkfifo (initctl_name, S_IRUSR | S_IWUSR);
51 - if ( ( initctl_fd = open (initctl_name, O_RDWR|O_NONBLOCK, 0) ) < 0 )
52 - err ( _("error opening fifo\n") );
54 - fcntl(initctl_fd,F_SETFD,FD_CLOEXEC); /*make sure no one inherits the fd*/
55 + open_initctl_fifo();
60 if (!stopped) hup_handler (sig);
61 } /* End Function sigtstp_handler */
63 +void open_initctl_fifo()
65 + if ( ( initctl_fd = open (initctl_name, O_RDWR|O_NONBLOCK, 0) ) < 0 ) {
66 + mkfifo (initctl_name, S_IRUSR | S_IWUSR);
67 + if ( ( initctl_fd = open (initctl_name, O_RDWR|O_NONBLOCK, 0) ) < 0 )
68 + err ( _("error opening fifo\n") );
70 + fcntl(initctl_fd,F_SETFD,FD_CLOEXEC); /*make sure no one inherits the fd*/
73 +void sigusr_handler (int sig)
78 + open ("/dev/console", O_RDONLY, 0);
79 + open ("/dev/console", O_RDWR, 0);
81 + open_initctl_fifo();
85 void sigterm_handler (int sig)
89 for (i = 1; i < NSIG; i++) signal (i, SIG_DFL);
90 sigprocmask(SIG_UNBLOCK,&all_signals,NULL);
95 open ("/dev/console", O_RDONLY, 0);
96 open ("/dev/console", O_RDWR, 0);