mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
finit-mdv checks filesystem if CHECKFS= parameter specified
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
7caf633259
commit
d87fb47cf3
2 files changed
+17
-3
No files matched your search
@@ -2,12 +2,12 @@ O.4 ()
|
|||||||
- default username for finit-alt configurable in Makefile
|
- default username for finit-alt configurable in Makefile
|
||||||
- create loopback device node in finit-alt (for squashfs)
|
- create loopback device node in finit-alt (for squashfs)
|
||||||
- add option to use built-in run-parts instead of /bin/run-parts
|
- add option to use built-in run-parts instead of /bin/run-parts
|
||||||
<<<<<<< HEAD:Changelog
|
|
||||||
- ignore signal instead of setting to an empty handler (Metalshark)
|
- ignore signal instead of setting to an empty handler (Metalshark)
|
||||||
- handle pam_console permissions in finit-alt for Mandriva
|
- handle pam_console permissions in finit-alt for Mandriva
|
||||||
=======
|
|
||||||
- add services.sh example and nash-hotplug patch for Mandriva
|
- add services.sh example and nash-hotplug patch for Mandriva
|
||||||
>>>>>>> a3ad99798e6ade97a981adf5b4376e758c97b894:Changelog
|
- mount /proc/bus/usb in Mandriva
|
||||||
|
- finit-mdv checks filesystem if CHECKFS= parameter is specified
|
||||||
|
|
||||||
|
|
||||||
0.3 (20080223)
|
0.3 (20080223)
|
||||||
- Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
|
- Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
|
||||||
|
|||||||
+14
@@ -62,6 +62,7 @@ THE SOFTWARE.
|
|||||||
#define REMOUNT_ROOTFS_RW
|
#define REMOUNT_ROOTFS_RW
|
||||||
#define MAKE_DEVICES
|
#define MAKE_DEVICES
|
||||||
#define PAM_CONSOLE
|
#define PAM_CONSOLE
|
||||||
|
#define CHECK_FS
|
||||||
#else /* original Eeepc distribution */
|
#else /* original Eeepc distribution */
|
||||||
#define RANDOMSEED "/var/lib/urandom/random-seed"
|
#define RANDOMSEED "/var/lib/urandom/random-seed"
|
||||||
#define SYSROOT "/mnt"
|
#define SYSROOT "/mnt"
|
||||||
@@ -144,12 +145,25 @@ int main()
|
|||||||
* Parse kernel parameters
|
* Parse kernel parameters
|
||||||
*/
|
*/
|
||||||
if ((f = fopen("/proc/cmdline", "r")) != NULL) {
|
if ((f = fopen("/proc/cmdline", "r")) != NULL) {
|
||||||
|
char *x;
|
||||||
fgets(line, LINE_SIZE, f);
|
fgets(line, LINE_SIZE, f);
|
||||||
if (strstr(line, "quiet")) {
|
if (strstr(line, "quiet")) {
|
||||||
close(0);
|
close(0);
|
||||||
close(1);
|
close(1);
|
||||||
close(2);
|
close(2);
|
||||||
}
|
}
|
||||||
|
#ifdef CHECK_FS
|
||||||
|
if ((x = strstr(line, "CHECKFS="))) {
|
||||||
|
char *c, cmd[256];
|
||||||
|
strncpy(cmd, "e2fsck -C -p -f ", LINE_SIZE);
|
||||||
|
c = cmd + strlen(cmd);
|
||||||
|
while (x && *x != ' ') *c++ = *x++;
|
||||||
|
system(cmd);
|
||||||
|
sync();
|
||||||
|
sync();
|
||||||
|
reboot(RB_AUTOBOOT);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user