slim: try again
[openpandora.oe.git] / recipes / slim / slim / chvt_on_exit_try2.patch
1 diff -u 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-10 02:29:38.182646783 +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\" -a \"`/bin/pidof X`\" = \"\" ]; 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;