mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	Fixes to vagrant box creation for jammy
This commit is contained in:
		
							parent
							
								
									fe2079ee8f
								
							
						
					
					
						commit
						15bcf678d9
					
				| @ -40,6 +40,7 @@ idx=0 | |||||||
| for box in "${boxes[@]}" | for box in "${boxes[@]}" | ||||||
| do | do | ||||||
|     if [ ! -z "$1" -a "$1" != "$box" ]; then |     if [ ! -z "$1" -a "$1" != "$box" ]; then | ||||||
|  |         let idx+=1 | ||||||
|         continue |         continue | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -31,6 +31,13 @@ if $dry_run; then | |||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | # prevent apt from running needrestart(1) | ||||||
|  | export NEEDRESTART_SUSPEND=true | ||||||
|  | 
 | ||||||
|  | # what major version of ubuntu are we installing on? | ||||||
|  | OS_MAJOR=$(. /etc/os-release; echo $VERSION_ID | awk -F. '{print $1}') | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| remove_line_continuation() { | remove_line_continuation() { | ||||||
|     local file="$1" |     local file="$1" | ||||||
|     awk ' |     awk ' | ||||||
| @ -67,15 +74,17 @@ install_packages() { | |||||||
|         # don't install slapd - it requires user input |         # don't install slapd - it requires user input | ||||||
|         pkgs="$(sed 's/slapd//g' <<< "$pkgs")" |         pkgs="$(sed 's/slapd//g' <<< "$pkgs")" | ||||||
| 
 | 
 | ||||||
|         if [ $(. /etc/os-release; echo $VERSION_ID | awk -F. '{print $1}') -ge 22 ]; |         if [ $OS_MAJOR -ge 22 ]; then | ||||||
|         then |  | ||||||
|             # don't install opendmarc on ubuntu 22 and higher - it requires |             # don't install opendmarc on ubuntu 22 and higher - it requires | ||||||
|             # interactive user input |             # interactive user input | ||||||
|             pkgs="$(sed 's/opendmarc//g' <<< "$pkgs")" |             pkgs="$(sed 's/opendmarc//g' <<< "$pkgs")" | ||||||
|         fi |         fi | ||||||
|          |          | ||||||
|         if [ ! -z "$pkgs" ]; then |         if [ ! -z "$pkgs" ]; then | ||||||
|  |             echo "" | ||||||
|  |             echo "=======================================================" | ||||||
|             echo "install: $pkgs" |             echo "install: $pkgs" | ||||||
|  |             echo "=======================================================" | ||||||
|             if ! $dry_run; then |             if ! $dry_run; then | ||||||
|                 apt-get install -y -qq $pkgs |                 apt-get install -y -qq $pkgs | ||||||
|             fi |             fi | ||||||
| @ -96,6 +105,8 @@ done | |||||||
| if ! $dry_run; then | if ! $dry_run; then | ||||||
|     # bonus |     # bonus | ||||||
|     apt-get install -y -qq openssh-server |     apt-get install -y -qq openssh-server | ||||||
|  |     # ssh-rsa no longer a default algorithm, but still used by vagrant | ||||||
|  |     echo "PubkeyAcceptedAlgorithms +ssh-rsa" > /etc/ssh/sshd_config.d/miabldap.conf | ||||||
|     apt-get install -y -qq emacs-nox |     apt-get install -y -qq emacs-nox | ||||||
|     apt-get install -y -qq ntpdate |     apt-get install -y -qq ntpdate | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user