source: flair-src/trunk/scripts/ubuntu_cgroup_hack_compat.sh@ 471

Last change on this file since 471 was 469, checked in by Sanahuja Guillaume, 3 years ago

change all scripts to remove call to distribution_specific_hack, which is no longer necessary

File size: 572 bytes
RevLine 
[469]1function red_echo () {
2 echo -e "\033[33m$1\033[0m"
3}
4
[306]5if [ -f /etc/lsb-release ]; then
6 . /etc/lsb-release
7fi
8
9if [ _$DISTRIB_ID == _Ubuntu ]; then
10 #we must run as root
11 if [ $EUID -ne 0 ]; then
12 exec sudo -E $0 $*
13 fi
14
15 #we must run in root cgroup to escape possible restrictions on scheduling
16 if [ -d /sys/fs/cgroup/cpu ]; then
17 echo $$ > /sys/fs/cgroup/cpu/tasks
18 fi
19fi
20
[469]21red_echo "Calling distribution_specific_hack_compat.sh should not be necessary; try without it or warn a Flair developer"
22red_echo "This script will be removed in future releases\n"
Note: See TracBrowser for help on using the repository browser.