From 12c50f7939c02db85f05830c4b9fccf464b3977a Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Thu, 11 Jun 2015 01:30:48 +0100 Subject: all script: use a standard style Based on the style used for the script in resources/scripts/helpers/build/release/ --- resources/scripts/misc/powertop.trisquel7 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'resources/scripts/misc') diff --git a/resources/scripts/misc/powertop.trisquel7 b/resources/scripts/misc/powertop.trisquel7 index 670c3791..25bb5976 100755 --- a/resources/scripts/misc/powertop.trisquel7 +++ b/resources/scripts/misc/powertop.trisquel7 @@ -22,7 +22,7 @@ set -u -e if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root" + printf "This script must be run as root\n" exit 1 fi @@ -33,19 +33,19 @@ apt-get -y install powertop # Remove startup symlink if it exists update-rc.d powertop remove # Remove previous file if it exists -rm -rf /etc/init.d/powertop +rm -Rf "/etc/init.d/powertop" # write the correct commands there: -echo "#!/bin/sh" > /etc/init.d/powertop -echo "/usr/sbin/powertop --auto-tune" >> /etc/init.d/powertop +printf "#!/bin/sh\n" > "/etc/init.d/powertop" +printf "/usr/sbin/powertop --auto-tune\n" >> "/etc/init.d/powertop" # make it executable: -chmod +x /etc/init.d/powertop +chmod +x "/etc/init.d/powertop" # Add the service to make it run automatically at boot time: update-rc.d powertop defaults # Run powertop now and tell the user powertop --auto-tune -echo "Done. Run 'powertop --auto-tune' now. This will also run automatically at boot time. Run it again at any time, if needed. This has also been done for you just now." +printf "Done. Run 'powertop --auto-tune' now. This will also run automatically at boot time. Run it again at any time, if needed. This has also been done for you just now.\n" -- cgit v1.2.3-70-g09d2