@@ -29,8 +29,8 @@ TUNED_DIR="/etc/tuned"
2929SCRIPTS_DIR=" /etc/tuned/scripts"
3030
3131# ensure tuned directory exists
32- sudo mkdir -p " $TUNED_DIR "
33- sudo mkdir -p " $SCRIPTS_DIR "
32+ mkdir -p " $TUNED_DIR "
33+ mkdir -p " $SCRIPTS_DIR "
3434
3535# First, deploy all scripts ending with "_script" to the shared scripts directory
3636echo " Deploying scripts to $SCRIPTS_DIR ..."
@@ -46,8 +46,8 @@ for file in "$CONFIGMAP_DIR"/*_script; do
4646 fi
4747
4848 # Copy the script and make it executable
49- sudo cp " $file " " $script_path "
50- sudo chmod +x " $script_path "
49+ cp " $file " " $script_path "
50+ chmod +x " $script_path "
5151 echo " deployed script: $script_name -> $script_path "
5252done
5353
@@ -62,10 +62,10 @@ for file in "$CONFIGMAP_DIR"/*; do
6262 custom_profile_dir=" $TUNED_DIR /$profile_name "
6363
6464 # Create a directory for the custom profile if it doesn't exist
65- sudo mkdir -p " $custom_profile_dir "
65+ mkdir -p " $custom_profile_dir "
6666
6767 # Copy the file contents as tuned.conf
68- sudo cp " $file " " $custom_profile_dir /tuned.conf"
68+ cp " $file " " $custom_profile_dir /tuned.conf"
6969 echo " created custom tuned profile: $profile_name "
7070done
7171
@@ -93,7 +93,7 @@ if [ -f "$TUNED_PROFILE_FILE" ]; then
9393
9494 echo " applying tuned profile(s): $tuned_profiles "
9595 # shellcheck disable=SC2086
96- sudo tuned-adm profile $tuned_profiles
96+ tuned-adm profile $tuned_profiles
9797else
9898 echo " WARNING: no tuned_profile file found in $CONFIGMAP_DIR "
9999fi
0 commit comments