source: flair-src/tags/latest/scripts/ubuntu_cgroup_hack_compat.sh

Last change on this file was 469, checked in by Sanahuja Guillaume, 2 years ago

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

File size: 572 bytes
Line 
1function red_echo () {
2 echo -e "\033[33m$1\033[0m"
3}
4
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
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.