View Single Post
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#99
Originally Posted by malkavian View Post
Ummm, and I am thinking that there isn't a command to modify swap priorities without disabling and re-enabling it.
Unfortunately yes. But for real defragmenting you still need to dis-/reenable the swap location.

Originally Posted by sixwheeledbeast View Post
I am certain I have seen some script that is
"if not root - sudo me"
Sure there is. Here, for your convenience
Code:
#!/bin/sh
# executing a shell script given as parameter(s) as root

if [ `id -u` != 0 ] ; then
       exec sudo gainroot <<EOF
exec sh $0 $*
EOF
       exit $?
fi

# own shell code from here
 

The Following 7 Users Say Thank You to peterleinchen For This Useful Post: