Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Commit fe4782b

Browse files
authored
Merge pull request #439 from octivi/headers
Add comment-header to files deployed by bootstrap-vz
2 parents 71253ae + 8e92cf7 commit fe4782b

32 files changed

+173
-53
lines changed

bootstrapvz/common/assets/extlinux/extlinux.conf

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
default l0
26
prompt 1
37
timeout 50

bootstrapvz/common/assets/init.d/expand-root

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/bash
22
### BEGIN INIT INFO
3-
# Provides: expand-root
4-
# Required-Start:
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: 2 3 4 5
9-
# Default-Stop:
10-
# Description: Expand the filesystem of the mounted root volume/partition to its maximum possible size
3+
# Provides: expand-root
4+
# Required-Start:
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: 2 3 4 5
9+
# Default-Stop:
10+
# Description-Short: Expand the filesystem of the mounted root volume/partition to its maximum possible size
11+
# Description: Expand the filesystem of the mounted root volume/partition to its maximum possible size
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216

1317
prog=$(basename $0)

bootstrapvz/common/assets/init.d/jessie/generate-ssh-hostkeys

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
22
### BEGIN INIT INFO
3-
# Provides: generate-ssh-hostkeys
4-
# Required-Start: $local_fs
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: S
9-
# Default-Stop:
10-
# Description: Generate ssh host keys if they do not exist
3+
# Provides: generate-ssh-hostkeys
4+
# Required-Start: $local_fs
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: S
9+
# Default-Stop:
10+
# Description-Short: Generate ssh host keys if they do not exist
11+
# Description: Generate ssh host keys if they do not exist.
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216

1317
prog=$(basename $0)

bootstrapvz/common/assets/init.d/squeeze/generate-ssh-hostkeys

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
22
### BEGIN INIT INFO
3-
# Provides: generate-ssh-hostkeys
4-
# Required-Start: $local_fs
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: S
9-
# Default-Stop:
10-
# Description: Generate ssh host keys if they do not exist
3+
# Provides: generate-ssh-hostkeys
4+
# Required-Start: $local_fs
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: S
9+
# Default-Stop:
10+
# Description-Short: Generate ssh host keys if they do not exist
11+
# Description: Generate ssh host keys if they do not exist.
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216

1317
prog=$(basename $0)

bootstrapvz/common/assets/init.d/ssh-generate-hostkeys

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Default-Stop:
99
# Short-Description: Generate ssh host keys if they do not exist
1010
# Description: Generate ssh host keys if they do not exist.
11-
# This is part of bootstrap-vz: http://github.com/andsens/bootstrap-vz
11+
# This file was created by bootstrap-vz.
1212
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
1313
# legal notices and disclaimers.
1414
### END INIT INFO

bootstrapvz/common/assets/init.d/wheezy/generate-ssh-hostkeys

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
22
### BEGIN INIT INFO
3-
# Provides: generate-ssh-hostkeys
4-
# Required-Start: $local_fs
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: S
9-
# Default-Stop:
10-
# Description: Generate ssh host keys if they do not exist
3+
# Provides: generate-ssh-hostkeys
4+
# Required-Start: $local_fs
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: S
9+
# Default-Stop:
10+
# Description-Short: Generate ssh host keys if they do not exist
11+
# Description: Generate ssh host keys if they do not exist.
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216

1317
prog=$(basename $0)

bootstrapvz/common/assets/ssh-generate-hostkeys

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
2+
# This file was created by bootstrap-vz.
3+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
4+
# legal notices and disclaimers.
5+
6+
# Generate ssh host keys if they do not exist.
7+
# Output the public keys to the console. This allows user to get host
8+
# keys securely through console log.
29

310
set -eu
411

512
prog="$(basename $0)"
613
logger="logger -t ${prog}"
714

8-
# Output the public keys to the console.
9-
# This allows user to get host keys securely through console log.
10-
1115
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" | ${logger}
1216
for key in ecdsa ed25519 rsa; do
1317
keyfile="/etc/ssh/ssh_host_${key}_key"

bootstrapvz/common/assets/systemd/logind.conf

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
14

25
[Login]
36
# Disable all TTY getters

bootstrapvz/common/assets/systemd/ssh-generate-hostkeys.service

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
[Unit]
26
Description=OpenBSD Secure Shell server Host Key Generation
37
ConditionFileNotEmpty=|!/etc/ssh/ssh_host_ecdsa_key

bootstrapvz/common/tasks/grub.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ class WriteGrubConfig(Task):
198198

199199
@classmethod
200200
def run(cls, info):
201-
grub_config_contents = ''
201+
grub_config_contents = """# This file was created by bootstrap-vz.
202+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
203+
# legal notices and disclaimers.
204+
205+
"""
202206
for key, value in info.grub_config.items():
203207
if isinstance(value, str):
204208
grub_config_contents += '{}="{}"\n'.format(key, value)
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
apt_preserve_sources_list: true
26
manage_etc_hosts: true

bootstrapvz/plugins/docker_daemon/assets/default/docker

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
# Docker Upstart and SysVinit configuration file
26

37
# Customize location of Docker binary (especially for development testing).

bootstrapvz/plugins/docker_daemon/assets/init.d/docker

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# self-sufficient containers from any application. The same container that a
1313
# developer builds and tests on a laptop can run at scale, in production, on
1414
# VMs, bare metal, OpenStack clusters, public clouds and more.
15+
#
16+
# This file was created by bootstrap-vz.
17+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
18+
# legal notices and disclaimers.
1519
### END INIT INFO
1620

1721
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

bootstrapvz/plugins/expand_root/assets/expand-root.service

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
[Unit]
26
Description=Expand the root partition and filesystem on boot
37
After=local-fs.target

bootstrapvz/plugins/expand_root/assets/expand-root.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
2+
# This file was created by bootstrap-vz.
3+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
4+
# legal notices and disclaimers.
5+
26
# Expands a partition and filesystem using growpart and an appropriate
37
# filesystem tool for live filesystem expansion. Takes three arguments:
48
# DEVICE, such as "/dev/sda"

bootstrapvz/plugins/minimize_size/assets/apt-autoremove-suggests

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
# Since Docker users are looking for the smallest possible final images, the
26
# following emerges as a very common pattern:
37
# RUN apt-get update \

bootstrapvz/plugins/minimize_size/assets/apt-clean

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
# Since for most Docker users, package installs happen in "docker build" steps,
26
# they essentially become individual layers due to the way Docker handles
37
# layering, especially using CoW filesystems. What this means for us is that

bootstrapvz/plugins/minimize_size/assets/apt-gzip-indexes

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
# Since Docker users using "RUN apt-get update && apt-get install -y ..." in
26
# their Dockerfiles don't go delete the lists files afterwards, we want them to
37
# be as small as possible on-disk, so we explicitly request "gz" versions and

bootstrapvz/plugins/minimize_size/assets/apt-languages

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
# In Docker, we don't often need the "Translations" files, so we're just wasting
26
# time and space by downloading them, and this inhibits that. For users that do
37
# need them, it's a simple matter to delete this file and "apt-get update". :)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/sh
2+
# This file was created by bootstrap-vz.
3+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
4+
# legal notices and disclaimers.
5+
26
# First we filter out all paths not relating to the stuff we want to filter
37
# After that we take out the paths that we *do* want to keep
48
grep 'EXCLUDE_PATTERN' | grep --invert-match --fixed-strings 'INCLUDE_PATHS'

bootstrapvz/plugins/minimize_size/assets/bootstrap-script.sh

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/sh
2+
# This file was created by bootstrap-vz.
3+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
4+
# legal notices and disclaimers.
25

36
# This script does not override anything defined in /usr/share/debootstrap/scripts
47
# Instead we use it to redefine extract_dpkg_deb_data(), so that we may exclude

bootstrapvz/plugins/vagrant/assets/Vagrantfile

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
Vagrant::Config.run do |config|
26
# This Vagrantfile is auto-generated by `vagrant package` to contain
37
# the MAC address of the box. Custom configuration should be placed in

bootstrapvz/providers/ec2/assets/bin/growpart

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919

20+
# This file was created by bootstrap-vz.
21+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
22+
# legal notices and disclaimers.
23+
2024
# the fudge factor. if its within this many 512 byte sectors, dont bother
2125
FUDGE=${GROWPART_FUDGE:-$((20*1024))}
2226
TEMP_D=""

bootstrapvz/providers/ec2/assets/ec2/53-ec2-network-interfaces.rules

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# specific language governing permissions and limitations under the
1414
# License.
1515

16+
# This file was created by bootstrap-vz.
17+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
18+
# legal notices and disclaimers.
19+
1620
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*", IMPORT{program}="/bin/sleep 1"
1721
SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/ec2net.hotplug"
1822

bootstrapvz/providers/ec2/assets/ec2/ec2dhcp.sh

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# specific language governing permissions and limitations under the
1616
# License.
1717

18+
# This file was created by bootstrap-vz.
19+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
20+
# legal notices and disclaimers.
21+
1822
INTERFACE="${interface}"
1923
PREFIX="${new_prefix}"
2024
. /etc/sysconfig/network-scripts/ec2net-functions

bootstrapvz/providers/ec2/assets/ec2/ec2net-functions

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# specific language governing permissions and limitations under the
1616
# License.
1717

18+
# This file was created by bootstrap-vz.
19+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
20+
# legal notices and disclaimers.
21+
1822
# This file is not a stand-alone shell script; it provides functions
1923
# to ec2 network scripts that source it.
2024

bootstrapvz/providers/ec2/assets/ec2/ec2net.hotplug

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# specific language governing permissions and limitations under the
1616
# License.
1717

18+
# This file was created by bootstrap-vz.
19+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
20+
# legal notices and disclaimers.
21+
1822
# During init and before the network service is started, metadata is not
1923
# available. Exit without attempting to configure the elastic interface.
2024
if [ `/sbin/runlevel | /usr/bin/cut -d\ -f2` -ne 5 ]; then

bootstrapvz/providers/ec2/assets/grub.d/40_custom

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/sh
2+
# This file was created by bootstrap-vz.
3+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
4+
# legal notices and disclaimers.
25

36
# This file generates the old menu.lst configuration with grub2
47
# It was copied from tomheadys github repo:

bootstrapvz/providers/ec2/assets/init.d/ec2-get-credentials

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/bash
22
### BEGIN INIT INFO
3-
# Provides: ec2-get-credentials
4-
# Required-Start: $network
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: 2 3 4 5
9-
# Default-Stop:
10-
# Description: Retrieve the ssh credentials and add to authorized_keys
3+
# Provides: ec2-get-credentials
4+
# Required-Start: $network
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: 2 3 4 5
9+
# Default-Stop:
10+
# Description-Short: Retrieve the ssh credentials and add to authorized_keys
11+
# Description: Retrieve the ssh credentials and add to authorized_keys.
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216
#
1317
# ec2-get-credentials - Retrieve the ssh credentials and add to authorized_keys

bootstrapvz/providers/ec2/assets/init.d/ec2-run-user-data

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/bash
22
### BEGIN INIT INFO
3-
# Provides: ec2-run-user-data
4-
# Required-Start: ec2-get-credentials
5-
# Required-Stop:
6-
# Should-Start:
7-
# Should-Stop:
8-
# Default-Start: 2 3 4 5
9-
# Default-Stop:
10-
# Description: Run instance user-data if it looks like a script.
3+
# Provides: ec2-run-user-data
4+
# Required-Start: ec2-get-credentials
5+
# Required-Stop:
6+
# Should-Start:
7+
# Should-Stop:
8+
# Default-Start: 2 3 4 5
9+
# Default-Stop:
10+
# Description-Short: Run instance user-data if it looks like a script
11+
# Description: Run instance user-data if it looks like a script.
12+
# This file was created by bootstrap-vz.
13+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
14+
# legal notices and disclaimers.
1115
### END INIT INFO
1216
#
1317
# Only retrieves and runs the user-data script once per instance. If

bootstrapvz/providers/ec2/assets/sysctl.d/tuning.conf

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This file was created by bootstrap-vz.
2+
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
3+
# legal notices and disclaimers.
4+
15
vm.swappiness = 0
26
vm.dirty_ratio = 80
37
vm.dirty_background_ratio = 5

0 commit comments

Comments
 (0)