On Fri, Nov 19, 2010 at 10:25 PM, Robert & Janet Bennett
<[email protected]> wrote:
> If it appears to begin to cause problems after it is applied. It looks
> quite simple to me to remove it again.
I'm not a big fan of the "edit this file and add this" instructions.
So here it is in a single cut-n-paste script for those of you running
Ubuntu:
--- start cut here ---
sudo true && (
# create bootup script
{ cat <<eof
#!/bin/bash
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
eof
} | sudo tee -a /etc/init.d/cgroup
sudo chmod +x /etc/init.d/cgroup
sudo ln -snf ../init.d/cgroup /etc/rcS.d/S10cgroup
# create initiate script
{ cat <<"eof"
if [ "$PS1" ] ; then
mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
echo $$ > /dev/cgroup/cpu/user/$$/tasks
echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
fi
eof
} | sudo tee /etc/profile.d/cgroup.sh
# create cleanup script
{ cat <<"eof"
#!/bin/sh
rmdir /dev/cgroup/cpu/$*
eof
} | sudo tee /usr/local/sbin/cgroup_clean
sudo chmod +x /usr/local/sbin/cgroup_clean
)
--- end cut here ---
You can verify the files were created with these commands:
# Verify
ls -la \
/etc/rcS.d/S10cgroup \
/etc/init.d/cgroup \
/etc/profile.d/cgroup.sh \
/usr/local/sbin/cgroup_clean
head -1000 \
/etc/rcS.d/S10cgroup \
/etc/init.d/cgroup \
/etc/profile.d/cgroup.sh \
/usr/local/sbin/cgroup_clean
And if you don't like it, you can remove the files with this command:
# To remove the above scripts and symlinks
sudo rm \
/etc/rcS.d/S10cgroup \
/etc/init.d/cgroup \
/etc/profile.d/cgroup.sh \
/usr/local/sbin/cgroup_clean
I'm running it on my UNR 10.04 eeePC network. Don't notice anything
considerably different.
Regards,
- Robert
--
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug