mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CLOUDSTACK-7143: split base.sh into its two functions.
This commit is contained in:
		
							parent
							
								
									0f2012e842
								
							
						
					
					
						commit
						e2f1740de5
					
				@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# Update the box
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
 | 
					export DEBIAN_PRIORITY=critical
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					apt-get -q -y --force-yes update
 | 
				
			||||||
 | 
					apt-get -q -y --force-yes install curl unzip
 | 
				
			||||||
 | 
					apt-get clean
 | 
				
			||||||
@ -1,29 +0,0 @@
 | 
				
			|||||||
# Update the box
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export DEBIAN_FRONTEND=noninteractive
 | 
					 | 
				
			||||||
export DEBIAN_PRIORITY=critical
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
apt-get -q -y --force-yes update
 | 
					 | 
				
			||||||
apt-get -q -y --force-yes install curl unzip
 | 
					 | 
				
			||||||
apt-get clean
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Set up sudo, TODO: Check security concerns
 | 
					 | 
				
			||||||
echo 'vagrant ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount' > /etc/sudoers.d/vagrant
 | 
					 | 
				
			||||||
echo 'cloud ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount' > /etc/sudoers.d/cloud
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Tweak sshd to prevent DNS resolution (speed up logins)
 | 
					 | 
				
			||||||
echo 'UseDNS no' >> /etc/ssh/sshd_config
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Remove 5s grub timeout to speed up booting
 | 
					 | 
				
			||||||
cat <<EOF > /etc/default/grub
 | 
					 | 
				
			||||||
# If you change this file, run 'update-grub' afterwards to update
 | 
					 | 
				
			||||||
# /boot/grub/grub.cfg.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
GRUB_DEFAULT=0
 | 
					 | 
				
			||||||
GRUB_TIMEOUT=0
 | 
					 | 
				
			||||||
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 | 
					 | 
				
			||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
 | 
					 | 
				
			||||||
GRUB_CMDLINE_LINUX="debian-installer=en_US"
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
update-grub
 | 
					 | 
				
			||||||
@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					# Remove 5s grub timeout to speed up booting
 | 
				
			||||||
 | 
					cat <<EOF > /etc/default/grub
 | 
				
			||||||
 | 
					# If you change this file, run 'update-grub' afterwards to update
 | 
				
			||||||
 | 
					# /boot/grub/grub.cfg.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GRUB_DEFAULT=0
 | 
				
			||||||
 | 
					GRUB_TIMEOUT=0
 | 
				
			||||||
 | 
					GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 | 
				
			||||||
 | 
					GRUB_CMDLINE_LINUX_DEFAULT="quiet"
 | 
				
			||||||
 | 
					GRUB_CMDLINE_LINUX="debian-installer=en_US"
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					update-grub
 | 
				
			||||||
@ -43,7 +43,8 @@ Veewee::Definition.declare({
 | 
				
			|||||||
  :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
 | 
					  :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
 | 
				
			||||||
  :shutdown_cmd => "halt -p",
 | 
					  :shutdown_cmd => "halt -p",
 | 
				
			||||||
  :postinstall_files => [
 | 
					  :postinstall_files => [
 | 
				
			||||||
    "base.sh",
 | 
					    "apt_upgrade.sh",
 | 
				
			||||||
 | 
					    "configure_grub.sh",
 | 
				
			||||||
    "postinstall.sh",
 | 
					    "postinstall.sh",
 | 
				
			||||||
    "cleanup.sh",
 | 
					    "cleanup.sh",
 | 
				
			||||||
    "zerodisk.sh"
 | 
					    "zerodisk.sh"
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# Update the box
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
 | 
					export DEBIAN_PRIORITY=critical
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					apt-get -q -y --force-yes update
 | 
				
			||||||
 | 
					apt-get -q -y --force-yes install curl unzip
 | 
				
			||||||
 | 
					apt-get clean
 | 
				
			||||||
@ -1,29 +0,0 @@
 | 
				
			|||||||
# Update the box
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export DEBIAN_FRONTEND=noninteractive
 | 
					 | 
				
			||||||
export DEBIAN_PRIORITY=critical
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
apt-get -q -y --force-yes update
 | 
					 | 
				
			||||||
apt-get -q -y --force-yes install curl unzip
 | 
					 | 
				
			||||||
apt-get clean
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Set up sudo, TODO: Check security concerns
 | 
					 | 
				
			||||||
echo 'vagrant ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount' > /etc/sudoers.d/vagrant
 | 
					 | 
				
			||||||
echo 'cloud ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount' > /etc/sudoers.d/cloud
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Tweak sshd to prevent DNS resolution (speed up logins)
 | 
					 | 
				
			||||||
echo 'UseDNS no' >> /etc/ssh/sshd_config
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Remove 5s grub timeout to speed up booting
 | 
					 | 
				
			||||||
cat <<EOF > /etc/default/grub
 | 
					 | 
				
			||||||
# If you change this file, run 'update-grub' afterwards to update
 | 
					 | 
				
			||||||
# /boot/grub/grub.cfg.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
GRUB_DEFAULT=0
 | 
					 | 
				
			||||||
GRUB_TIMEOUT=0
 | 
					 | 
				
			||||||
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 | 
					 | 
				
			||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
 | 
					 | 
				
			||||||
GRUB_CMDLINE_LINUX="debian-installer=en_US"
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
update-grub
 | 
					 | 
				
			||||||
@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					# Remove 5s grub timeout to speed up booting
 | 
				
			||||||
 | 
					cat <<EOF > /etc/default/grub
 | 
				
			||||||
 | 
					# If you change this file, run 'update-grub' afterwards to update
 | 
				
			||||||
 | 
					# /boot/grub/grub.cfg.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GRUB_DEFAULT=0
 | 
				
			||||||
 | 
					GRUB_TIMEOUT=0
 | 
				
			||||||
 | 
					GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 | 
				
			||||||
 | 
					GRUB_CMDLINE_LINUX_DEFAULT="quiet"
 | 
				
			||||||
 | 
					GRUB_CMDLINE_LINUX="debian-installer=en_US"
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					update-grub
 | 
				
			||||||
@ -43,7 +43,8 @@ Veewee::Definition.declare({
 | 
				
			|||||||
  :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
 | 
					  :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
 | 
				
			||||||
  :shutdown_cmd => "halt -p",
 | 
					  :shutdown_cmd => "halt -p",
 | 
				
			||||||
  :postinstall_files => [
 | 
					  :postinstall_files => [
 | 
				
			||||||
    "base.sh",
 | 
					    "apt_upgrade.sh",
 | 
				
			||||||
 | 
					    "configure_grub.sh",
 | 
				
			||||||
    "postinstall.sh",
 | 
					    "postinstall.sh",
 | 
				
			||||||
    "cleanup.sh",
 | 
					    "cleanup.sh",
 | 
				
			||||||
    "zerodisk.sh"
 | 
					    "zerodisk.sh"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user