mirror of
				https://github.com/flynx/post-install.git
				synced 2025-10-31 11:40:06 +00:00 
			
		
		
		
	tweaks and changes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									ab7154030b
								
							
						
					
					
						commit
						8c95ca4f84
					
				
							
								
								
									
										43
									
								
								post-install
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										43
									
								
								post-install
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -40,7 +40,7 @@ USER_SCRIPT_DIR=${0}.d/user/ | |||||||
| # System info... | # System info... | ||||||
| if ! [ -z "$(type -t dmidecode )" ] ; then | if ! [ -z "$(type -t dmidecode )" ] ; then | ||||||
| 	# XXX should we be more specific here and include model number?? | 	# XXX should we be more specific here and include model number?? | ||||||
| 	PLATFORM=$( dmidecode \ | 	PLATFORM=$( sudo dmidecode \ | ||||||
| 		| grep -A3 '^System Information' \ | 		| grep -A3 '^System Information' \ | ||||||
| 		| grep 'Version:' \ | 		| grep 'Version:' \ | ||||||
| 		| sed 's/\s*Version:\s*//' ) | 		| sed 's/\s*Version:\s*//' ) | ||||||
| @ -59,6 +59,7 @@ PLATFORM_SCRIPT_DIR=${SCRIPT_DIR}/platform/${PLATFORM} | |||||||
| FEATURES=( | FEATURES=( | ||||||
| 	dir | 	dir | ||||||
| 
 | 
 | ||||||
|  | 	dnf-config | ||||||
| 	dnf | 	dnf | ||||||
| 	flatpak | 	flatpak | ||||||
| 	npm | 	npm | ||||||
| @ -207,6 +208,7 @@ SAVE=( | |||||||
| # XXX this should be split into system and user sections... | # XXX this should be split into system and user sections... | ||||||
| ALL_FEATURES=( | ALL_FEATURES=( | ||||||
| 	# system... | 	# system... | ||||||
|  | 	dnf-config | ||||||
| 	dnf | 	dnf | ||||||
| 	flatpak | 	flatpak | ||||||
| 	snap | 	snap | ||||||
| @ -215,7 +217,7 @@ ALL_FEATURES=( | |||||||
| 
 | 
 | ||||||
| 	start-services | 	start-services | ||||||
| 
 | 
 | ||||||
| 	# user.. | 	# user... | ||||||
| 
 | 
 | ||||||
| 	dir | 	dir | ||||||
| 	syncthing | 	syncthing | ||||||
| @ -226,6 +228,8 @@ ALL_FEATURES=( | |||||||
| 
 | 
 | ||||||
| 	start-user-services | 	start-user-services | ||||||
| 
 | 
 | ||||||
|  | 	gnome | ||||||
|  | 
 | ||||||
| 	# keep this last... | 	# keep this last... | ||||||
| 	scripts | 	scripts | ||||||
| 	platform-scripts | 	platform-scripts | ||||||
| @ -233,6 +237,24 @@ ALL_FEATURES=( | |||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
|  | function feature-dnf-config(){ | ||||||
|  | 	if [ -z "$(grep 'f_lynx/post-install' /etc/dnf/dnf.conf)" ] ; then | ||||||
|  | 		echo Updating config | ||||||
|  | 		# a bit ugly... | ||||||
|  | 		cat << EOF | sudo tee -a /etc/dnf/dnf.conf > /dev/null | ||||||
|  | 
 | ||||||
|  | # added by f_lynx/post-install script... | ||||||
|  | fastmirror=True | ||||||
|  | max_parallel_downloads=10 | ||||||
|  | defaultyes=True | ||||||
|  | EOF | ||||||
|  | 	else | ||||||
|  | 		echo Already updated. | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| function feature-dir(){ | function feature-dir(){ | ||||||
| 	@setupList mkdir -p - ${DIR[@]} | 	@setupList mkdir -p - ${DIR[@]} | ||||||
| @ -369,8 +391,8 @@ function feature-syncthing(){ | |||||||
| 	#			- link device | 	#			- link device | ||||||
| 	#			- share ALL directory | 	#			- share ALL directory | ||||||
| 	#			- wait for sync | 	#			- wait for sync | ||||||
| 	@ echo "Waiting for Syncthing to be connected with other devices manually." | 	echo "Waiting for Syncthing to be connected with other devices manually." | ||||||
| 	@ read -p "(press any key when done)" | 	read -p "(press any key when done)" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -541,9 +563,10 @@ Options: | |||||||
|     -d | --dry-run          - report the actions but do nothing. |     -d | --dry-run          - report the actions but do nothing. | ||||||
|     -q | --quiet            - run in quiet mode. |     -q | --quiet            - run in quiet mode. | ||||||
| 
 | 
 | ||||||
|     --list-features     - list enabled features. |     -l | --list-features    - list enabled features. | ||||||
|     --list-all-features - list supported features. |     -la | --list-all-features  | ||||||
|     --list-scripts      - list available scripts. |                             - list supported features. | ||||||
|  |     -ls | --list-scripts    - list available scripts. | ||||||
| 
 | 
 | ||||||
| External configuration: | External configuration: | ||||||
|     -s | --source FILE      - read config from file. |     -s | --source FILE      - read config from file. | ||||||
| @ -597,15 +620,15 @@ while ! [ -z "$1" ] ; do | |||||||
| 			;; | 			;; | ||||||
| 
 | 
 | ||||||
| 		# introspection... | 		# introspection... | ||||||
| 		--list-features) | 		-l|--list-features) | ||||||
| 			echo ${FEATURES[@]} | 			echo ${FEATURES[@]} | ||||||
| 			exit | 			exit | ||||||
| 			;; | 			;; | ||||||
| 		--list-all-features) | 		-la|--list-all-features) | ||||||
| 			echo ${ALL_FEATURES[@]} | 			echo ${ALL_FEATURES[@]} | ||||||
| 			exit | 			exit | ||||||
| 			;; | 			;; | ||||||
| 		--list-scripts) | 		-ls|--list-scripts) | ||||||
| 			listScripts | 			listScripts | ||||||
| 			exit | 			exit | ||||||
| 			;; | 			;; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user