Add sudo to script
This commit is contained in:
		@@ -3,8 +3,14 @@
 | 
			
		||||
run_directory=$(dirname $(readlink -f "$0"))
 | 
			
		||||
source "$run_directory/variables.conf"
 | 
			
		||||
 | 
			
		||||
if [[ $user != 'root' ]]; then
 | 
			
		||||
  sudo="sudo"
 | 
			
		||||
else
 | 
			
		||||
  sudo=""
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Build UKI
 | 
			
		||||
objcopy \
 | 
			
		||||
$sudo objcopy \
 | 
			
		||||
  --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
 | 
			
		||||
  --add-section .cmdline="/etc/kernel/cmdline" --change-section-vma .cmdline=0x30000 \
 | 
			
		||||
  --add-section .linux="$path_to_vmlinuz_link/vmlinuz" --change-section-vma .linux=0x40000 \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user