Index: /trunk/demos/CircleFollower/simulator/src/main.cpp
===================================================================
--- /trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 227)
+++ /trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 228)
@@ -127,2 +127,3 @@
   return 0;
 }
+
Index: /trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh
===================================================================
--- /trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 227)
+++ /trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu 
Index: /trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh
===================================================================
--- /trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 227)
+++ /trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x4.sh
===================================================================
--- /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x4.sh	(revision 227)
+++ /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x4.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -t x4 -p 9000 -a 127.0.0.1 -x setup_x4.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x8.sh	(revision 227)
+++ /trunk/demos/Gps/simulator/build_x86_64/bin/simulator_x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -t x8 -p 9000 -a 127.0.0.1 -x setup_x8.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: /trunk/demos/Gps/uav/build_x86_64/bin/x4.sh
===================================================================
--- /trunk/demos/Gps/uav/build_x86_64/bin/x4.sh	(revision 227)
+++ /trunk/demos/Gps/uav/build_x86_64/bin/x4.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
Index: /trunk/demos/Gps/uav/build_x86_64/bin/x8.sh
===================================================================
--- /trunk/demos/Gps/uav/build_x86_64/bin/x8.sh	(revision 227)
+++ /trunk/demos/Gps/uav/build_x86_64/bin/x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x4.sh
===================================================================
--- /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x4.sh	(revision 227)
+++ /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x4.sh	(revision 228)
@@ -1,7 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
-
-export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libdrm_intel.so.1:/usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2:/usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1
 
 if [ -f /proc/xenomai/version ];then
@@ -11,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x setup_x4.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x8.sh	(revision 227)
+++ /trunk/demos/OpticalFlow/simulator/build_x86_64/bin/simulator_x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x setup_x8.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x4.sh
===================================================================
--- /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x4.sh	(revision 227)
+++ /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x4.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu -v dsp_stub
Index: /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x8.sh
===================================================================
--- /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x8.sh	(revision 227)
+++ /trunk/demos/OpticalFlow/uav/build_x86_64/bin/x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x8.xml -t x8_simu -v dsp_stub
Index: /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x4.sh
===================================================================
--- /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x4.sh	(revision 227)
+++ /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x4.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $IGEP_ROOT/uav_dev/bin/noarch/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x setup_x4.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x8.sh	(revision 227)
+++ /trunk/demos/PidStandalone/simulator/build_x86_64/bin/simulator_x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $IGEP_ROOT/uav_dev/bin/noarch/distribution_specific_hack.sh
+
 $EXEC  -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x setup_x8.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: /trunk/demos/PidStandalone/uav/build_x86_64/bin/x4.sh
===================================================================
--- /trunk/demos/PidStandalone/uav/build_x86_64/bin/x4.sh	(revision 227)
+++ /trunk/demos/PidStandalone/uav/build_x86_64/bin/x4.sh	(revision 228)
@@ -1,6 +1,3 @@
 #! /bin/bash
-
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
-
 if [ -f /proc/xenomai/version ];then
 	EXEC=./demo_pid_rt
@@ -9,3 +6,5 @@
 fi
 
+. $IGEP_ROOT/uav_dev/bin/noarch/distribution_specific_hack.sh
+
 $EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x4.xml -t x4_simu $*
Index: /trunk/demos/PidStandalone/uav/build_x86_64/bin/x8.sh
===================================================================
--- /trunk/demos/PidStandalone/uav/build_x86_64/bin/x8.sh	(revision 227)
+++ /trunk/demos/PidStandalone/uav/build_x86_64/bin/x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $IGEP_ROOT/uav_dev/bin/noarch/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: /trunk/demos/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- /trunk/demos/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh	(revision 227)
+++ /trunk/demos/SimpleFleet/simulator/build_x86_64/bin/simulator_x8.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8 -a 127.0.0.1 -p 9000 -x setup_x8.xml -o 10 -m $FLAIR_ROOT/flair-bin/models -s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
Index: /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh
===================================================================
--- /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh	(revision 227)
+++ /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_0.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu0 -b 127.255.255.255:20010
Index: /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh
===================================================================
--- /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh	(revision 227)
+++ /trunk/demos/SimpleFleet/uav/build_x86_64/bin/x8_1.sh	(revision 228)
@@ -1,5 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
 
 if [ -f /proc/xenomai/version ];then
@@ -9,3 +7,5 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC -n x8_1 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu1 -b 127.255.255.255:20010 -d 21000
Index: /trunk/demos/Sinus/build_x86_64/bin/Sinus.sh
===================================================================
--- /trunk/demos/Sinus/build_x86_64/bin/Sinus.sh	(revision 227)
+++ /trunk/demos/Sinus/build_x86_64/bin/Sinus.sh	(revision 228)
@@ -1,6 +1,3 @@
 #! /bin/bash
-
-. $FLAIR_ROOT/flair-dev/scripts/ubuntu_cgroup_hack.sh
-
 if [ -f /proc/xenomai/version ];then
 	EXEC=./Sinus_rt
@@ -9,4 +6,6 @@
 fi
 
+. $FLAIR_ROOT/flair-dev/scripts/distribution_specific_hack.sh
+
 $EXEC
 
