mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
Draw shutdown splash screen using C calls instead of system("echo;cat")
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
cdbc2c536d
commit
1fc2d9596a
3 files changed
+12
-11
No files matched your search
@@ -8,6 +8,7 @@
|
|||||||
- use direct calls to set loopback instead of system("ifconfig")
|
- use direct calls to set loopback instead of system("ifconfig")
|
||||||
- replace system("cat") and system("dd") with C implementation
|
- replace system("cat") and system("dd") with C implementation
|
||||||
- moved finit-mod and finit-alt helpers to helpers.c
|
- moved finit-mod and finit-alt helpers to helpers.c
|
||||||
|
- replace system("echo;cat") to draw shutdown splash with C calls
|
||||||
|
|
||||||
0.1 (20081214)
|
0.1 (20081214)
|
||||||
- initial release
|
- initial release
|
||||||
+5
-5
@@ -316,9 +316,9 @@ int main()
|
|||||||
|
|
||||||
/* parent process */
|
/* parent process */
|
||||||
|
|
||||||
system(GETTY " &");
|
system(GETTY "&");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
system("/usr/sbin/services.sh &> /dev/null &");
|
system("/usr/sbin/services.sh &>/dev/null&");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
sigemptyset(&nmask);
|
sigemptyset(&nmask);
|
||||||
@@ -339,9 +339,9 @@ void do_shutdown(int sig)
|
|||||||
|
|
||||||
kill(-1, SIGTERM);
|
kill(-1, SIGTERM);
|
||||||
|
|
||||||
system("/bin/echo -e \"\033[?25l\033[30;40m\"; "
|
write(1, "\033[?25l\033[30;40m", 14);
|
||||||
"/bin/cp /boot/shutdown.fb /dev/fb/0");
|
copyfile("/boot/shutdown.fb", "/dev/fb/0");
|
||||||
sleep(1);
|
sleep(2);
|
||||||
|
|
||||||
system("/usr/sbin/alsactl store > /dev/null 2>&1");
|
system("/usr/sbin/alsactl store > /dev/null 2>&1");
|
||||||
system("/sbin/hwclock --systohc --localtime" HWCLOCK_DIRECTISA);
|
system("/sbin/hwclock --systohc --localtime" HWCLOCK_DIRECTISA);
|
||||||
|
|||||||
+6
-6
@@ -37,6 +37,7 @@ Changelog from the original Eeepc fastinit:
|
|||||||
- Change /proc/acpi/sleep to /sys/power/state (by Metalshark)
|
- Change /proc/acpi/sleep to /sys/power/state (by Metalshark)
|
||||||
- Set loopback interface using direct calls instead of system("ifconfig")
|
- Set loopback interface using direct calls instead of system("ifconfig")
|
||||||
- Copy 4096 data block in C instead of system("cat") or system("dd")
|
- Copy 4096 data block in C instead of system("cat") or system("dd")
|
||||||
|
- Draw shutdown splash screen using C calls instead of system("echo;cat")
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -254,9 +255,9 @@ int main()
|
|||||||
|
|
||||||
/* parent process */
|
/* parent process */
|
||||||
|
|
||||||
system("/sbin/getty 38400 tty3 &");
|
system("/sbin/getty 38400 tty3&");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
system("/usr/sbin/services.sh &> /dev/null &");
|
system("/usr/sbin/services.sh &>/dev/null&");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
sigemptyset(&nmask);
|
sigemptyset(&nmask);
|
||||||
@@ -276,10 +277,9 @@ void do_shutdown(int sig)
|
|||||||
|
|
||||||
kill(-1, SIGTERM);
|
kill(-1, SIGTERM);
|
||||||
|
|
||||||
system("/bin/echo -e \"\033[?25l\033[30;40m\"; "
|
write(1, "\033[?25l\033[30;40m", 14);
|
||||||
"/bin/cp /boot/shutdown.fb /dev/fb/0");
|
copyfile("/boot/shutdown.fb", "/dev/fb/0");
|
||||||
sleep(1);
|
sleep(2);
|
||||||
sleep(1);
|
|
||||||
|
|
||||||
system("/usr/sbin/alsactl store > /dev/null 2>&1");
|
system("/usr/sbin/alsactl store > /dev/null 2>&1");
|
||||||
system("/sbin/hwclock --systohc --localtime" HWCLOCK_DIRECTISA);
|
system("/sbin/hwclock --systohc --localtime" HWCLOCK_DIRECTISA);
|
||||||
|
|||||||
Reference in new issue
Block a user