mirror of
				https://gitea.blesmrt.net/mikaela/scripts.git
				synced 2025-10-31 17:37:20 +01:00 
			
		
		
		
	{deb-update,fix-kernel-install}.bash: remove commented wrong tracks section rresolving another TODO
This commit is contained in:
		
							parent
							
								
									93dac934fe
								
							
						
					
					
						commit
						a445377236
					
				| @ -150,17 +150,5 @@ if [ -f /root/fixgrub.bash ]; then | ||||
| 	. /root/fixgrub.bash | ||||
| fi | ||||
| 
 | ||||
| # Lumina & Sedric have been having kernel update issues, let's see if this | ||||
| # script could detect and suggest action for that. | ||||
| # if [ -f /root/fix-kernel-install.bash ]; then | ||||
| # 	. /root/fix-kernel-install.bash | ||||
| # fi | ||||
| # TODO: This seems to have been entirely on wrong track. Remove it? | ||||
| #if hash kernel-install 2> /dev/null; then | ||||
| #	sleep 3 | ||||
| #	kernel-install add-all -v | ||||
| #	sleep 5 | ||||
| #fi | ||||
| 
 | ||||
| # Hide commands being executed again | ||||
| set +x | ||||
|  | ||||
| @ -1,41 +0,0 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| #set -x | ||||
| 
 | ||||
| export LC_ALL=en_DK.UTF-8 | ||||
| 
 | ||||
| # Check for existence of /etc/machine-id/ | ||||
| if [ -f /etc/machine-id ]; then | ||||
| 
 | ||||
| 	# How about we just store the machine-id instead of fetching it | ||||
| 	# constantly? | ||||
| 	MACHINEID="$(cat /etc/machine-id)" | ||||
| 	#echo "Our machine-id is $MACHINEID" | ||||
| 
 | ||||
| 	# Check for existence of the /boot/<machine-id> directory | ||||
| 	if [ -d /boot/efi/"$MACHINEID" ]; then | ||||
| 
 | ||||
| 		# Store the latest installed kernel to $EXPECTEDKERNEL | ||||
| 		EXPECTEDKERNEL="$(find /lib/modules -maxdepth 1 -printf '%P\n' | sort | tail -n -1)" | ||||
| 
 | ||||
| 		# And actual kernel in the boot/efi directory | ||||
| 		ACTUALKERNEL="$(find /boot/efi/"$MACHINEID"/ -maxdepth 1 -printf '%P\n' | sort | tail -n -1)" | ||||
| 
 | ||||
| 		# Are they the same? Everything OK! | ||||
| 		if [ "$EXPECTEDKERNEL" == "$ACTUALKERNEL" ]; then | ||||
| 			echo "The kernel situation seems OK." | ||||
| 
 | ||||
| 		else | ||||
| 			printf "\nWARNING! Kernels mismatch! Suggested actions:\n" | ||||
| 			printf "\tsudo mkdir /boot/%b/%b\n" "$MACHINEID" "$EXPECTEDKERNEL" | ||||
| 			printf "\tsudo kernel-install -v add %b /lib/modules/%b/vmlinuz\n" "$EXPECTEDKERNEL" "$EXPECTEDKERNEL" | ||||
| 			#printf "\tsudo dnf reinstall kernel-core-%b -y\n" "$EXPECTEDKERNEL" | ||||
| 			printf "Please note that Lumina and Sedric have moved to UKI.\n" | ||||
| 		fi | ||||
| 	fi | ||||
| fi | ||||
| 
 | ||||
| echo "New kernel? Just in case, try sudo kernel-install -v add $(uname -r) # although using the actual new kernel version" | ||||
| echo "Alternatively sudo kernel-install -v add-all" | ||||
| 
 | ||||
| #set +x | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user