8c846f38d4b0c80d58a130345e996d598fe95469
[openpandora.oe.git] / recipes / slim / slim / chvt_on_exit_try2.patch
1 diff -ur slim-1.3.1_/main.cpp slim-1.3.1/main.cpp
2 --- slim-1.3.1_/main.cpp        2008-09-26 03:54:15.000000000 +0300
3 +++ slim-1.3.1/main.cpp 2015-07-06 02:40:17.534545611 +0300
4 @@ -14,7 +14,13 @@
5  
6  App* LoginApp = 0;
7  
8 +static void do_chvt(void)
9 +{
10 +    system("if [ \"`/sbin/runlevel | awk '{print $2}'`\" = \"5\" ]; then /usr/bin/chvt 1; fi");
11 +}
12 +
13  int main(int argc, char** argv) {
14 +    atexit(do_chvt);
15      LoginApp = new App(argc, argv);
16      LoginApp->Run();
17      return 0;