From 7e550ae6c9fd5e60f7968c54e86382f95094c650 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Sun, 29 Dec 2013 18:08:08 +0200 Subject: [PATCH] Fixed suspension script output (used sh instead of bash) --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 1260573..d50fe69 100755 --- a/install.sh +++ b/install.sh @@ -115,13 +115,13 @@ case $yn in # This creates a file in /etc/pm/sleep.d which runs on system suspend & resume, but this script uses case to run only on resume # sudo -k makes sure password is prompted regardless of its cache state # sh -c is required for sudo to perform inside ore-written script - sudo -k sh -c "echo -e \"case \"\${1}\" in\n\tresume|thaw)\n\t\t${pwd}/update.sh\n\t;;\nesac\" > /etc/pm/sleep.d/RotatingWallpaper.sh" + sudo -k bash -c "echo -e \"case \"\$\{1\}\" in\n\tresume|thaw)\n\t\t${pwd}/update.sh\n\t;;\nesac\" > /etc/pm/sleep.d/RotatingWallpaper.sh" if [ $? -ne 0 ]; then # Error code is not 0 (not success) echo "ERROR: Return from suspension script not created."; else # Chmod & chown the new file - sudo sh -c "chmod +x /etc/pm/sleep.d/RotatingWallpaper.sh" - sudo sh -c "chown $USER /etc/pm/sleep.d/RotatingWallpaper.sh" + sudo bash -c "chmod +x /etc/pm/sleep.d/RotatingWallpaper.sh" + sudo bash -c "chown $USER /etc/pm/sleep.d/RotatingWallpaper.sh" fi ;; esac