compat: fix bin/get-compat-kernels install calls
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 6 Jul 2012 20:37:51 +0000 (13:37 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 6 Jul 2012 20:37:51 +0000 (13:37 -0700)
The installation requires running sudo on other calls.
Fix by adding sudo calls.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
bin/get-compat-kernels

index 9fa23eb88c0fde62520c6804998184cb63571acd..61ea40c99d020ecb4f3e6c5a0c4a5597ac3c6e76 100755 (executable)
@@ -156,19 +156,19 @@ function get_ubuntu_kernels() {
 
        # Move the extracted folders into the system
        if [[ -d $TEMP_DIR/lib/modules ]]; then
-               mv $TEMP_DIR/lib/modules/* /lib/modules
+               sudo mv $TEMP_DIR/lib/modules/* /lib/modules
        fi
        if [[ -d $TEMP_DIR/usr/src ]]; then
                # Because of a bug in make < 3.82, mixed implicit and normal
                # rules do not cause harm. Since the bug is fixed in the new make
                # we have to adjust older kernel's Makefiles to fix the bug.
-               sed -i 's#^/ %/:#%/:#' $TEMP_DIR/usr/src/linux-headers-2.6.2[45678]-0*/Makefile &>/dev/null
+               sudo sed -i 's#^/ %/:#%/:#' $TEMP_DIR/usr/src/linux-headers-2.6.2[45678]-0*/Makefile &>/dev/null
 
-               mv $TEMP_DIR/usr/src/* /usr/src
+               sudo mv $TEMP_DIR/usr/src/* /usr/src
        fi
 
        # Remove the temporary directory
-       rm -rf $TEMP_DIR
+       sudo rm -rf $TEMP_DIR
 }
 
 function usage() {