mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
Add comment-header to files deployed by bootstrap-vz (resolves #429)
This commit is contained in:
parent
ad2c455c4c
commit
8e92cf7db9
32 changed files with 173 additions and 53 deletions
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
default l0
|
||||
prompt 1
|
||||
timeout 50
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: expand-root
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description: Expand the filesystem of the mounted root volume/partition to its maximum possible size
|
||||
# Provides: expand-root
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description-Short: Expand the filesystem of the mounted root volume/partition to its maximum possible size
|
||||
# Description: Expand the filesystem of the mounted root volume/partition to its maximum possible size
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
||||
prog=$(basename $0)
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description: Generate ssh host keys if they do not exist
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description-Short: Generate ssh host keys if they do not exist
|
||||
# Description: Generate ssh host keys if they do not exist.
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
||||
prog=$(basename $0)
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description: Generate ssh host keys if they do not exist
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description-Short: Generate ssh host keys if they do not exist
|
||||
# Description: Generate ssh host keys if they do not exist.
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
||||
prog=$(basename $0)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# Default-Stop:
|
||||
# Short-Description: Generate ssh host keys if they do not exist
|
||||
# Description: Generate ssh host keys if they do not exist.
|
||||
# This is part of bootstrap-vz: http://github.com/andsens/bootstrap-vz
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description: Generate ssh host keys if they do not exist
|
||||
# Provides: generate-ssh-hostkeys
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Description-Short: Generate ssh host keys if they do not exist
|
||||
# Description: Generate ssh host keys if they do not exist.
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
||||
prog=$(basename $0)
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/sh
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Generate ssh host keys if they do not exist.
|
||||
# Output the public keys to the console. This allows user to get host
|
||||
# keys securely through console log.
|
||||
|
||||
set -eu
|
||||
|
||||
prog="$(basename $0)"
|
||||
logger="logger -t ${prog}"
|
||||
|
||||
# Output the public keys to the console.
|
||||
# This allows user to get host keys securely through console log.
|
||||
|
||||
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" | ${logger}
|
||||
for key in ecdsa ed25519 rsa; do
|
||||
keyfile="/etc/ssh/ssh_host_${key}_key"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
[Login]
|
||||
# Disable all TTY getters
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
[Unit]
|
||||
Description=OpenBSD Secure Shell server Host Key Generation
|
||||
ConditionFileNotEmpty=|!/etc/ssh/ssh_host_ecdsa_key
|
||||
|
|
|
@ -198,7 +198,11 @@ class WriteGrubConfig(Task):
|
|||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
grub_config_contents = ''
|
||||
grub_config_contents = """# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
"""
|
||||
for key, value in info.grub_config.items():
|
||||
if isinstance(value, str):
|
||||
grub_config_contents += '{}="{}"\n'.format(key, value)
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
apt_preserve_sources_list: true
|
||||
manage_etc_hosts: true
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Docker Upstart and SysVinit configuration file
|
||||
|
||||
# Customize location of Docker binary (especially for development testing).
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
# self-sufficient containers from any application. The same container that a
|
||||
# developer builds and tests on a laptop can run at scale, in production, on
|
||||
# VMs, bare metal, OpenStack clusters, public clouds and more.
|
||||
#
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
|
||||
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
[Unit]
|
||||
Description=Expand the root partition and filesystem on boot
|
||||
After=local-fs.target
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Expands a partition and filesystem using growpart and an appropriate
|
||||
# filesystem tool for live filesystem expansion. Takes three arguments:
|
||||
# DEVICE, such as "/dev/sda"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Since Docker users are looking for the smallest possible final images, the
|
||||
# following emerges as a very common pattern:
|
||||
# RUN apt-get update \
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Since for most Docker users, package installs happen in "docker build" steps,
|
||||
# they essentially become individual layers due to the way Docker handles
|
||||
# layering, especially using CoW filesystems. What this means for us is that
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# Since Docker users using "RUN apt-get update && apt-get install -y ..." in
|
||||
# their Dockerfiles don't go delete the lists files afterwards, we want them to
|
||||
# be as small as possible on-disk, so we explicitly request "gz" versions and
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# In Docker, we don't often need the "Translations" files, so we're just wasting
|
||||
# time and space by downloading them, and this inhibits that. For users that do
|
||||
# need them, it's a simple matter to delete this file and "apt-get update". :)
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/sh
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# First we filter out all paths not relating to the stuff we want to filter
|
||||
# After that we take out the paths that we *do* want to keep
|
||||
grep 'EXCLUDE_PATTERN' | grep --invert-match --fixed-strings 'INCLUDE_PATHS'
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# This script does not override anything defined in /usr/share/debootstrap/scripts
|
||||
# Instead we use it to redefine extract_dpkg_deb_data(), so that we may exclude
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
Vagrant::Config.run do |config|
|
||||
# This Vagrantfile is auto-generated by `vagrant package` to contain
|
||||
# the MAC address of the box. Custom configuration should be placed in
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# the fudge factor. if its within this many 512 byte sectors, dont bother
|
||||
FUDGE=${GROWPART_FUDGE:-$((20*1024))}
|
||||
TEMP_D=""
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
# specific language governing permissions and limitations under the
|
||||
# License.
|
||||
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*", IMPORT{program}="/bin/sleep 1"
|
||||
SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/ec2net.hotplug"
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
# specific language governing permissions and limitations under the
|
||||
# License.
|
||||
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
INTERFACE="${interface}"
|
||||
PREFIX="${new_prefix}"
|
||||
. /etc/sysconfig/network-scripts/ec2net-functions
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
# specific language governing permissions and limitations under the
|
||||
# License.
|
||||
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# This file is not a stand-alone shell script; it provides functions
|
||||
# to ec2 network scripts that source it.
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
# specific language governing permissions and limitations under the
|
||||
# License.
|
||||
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# During init and before the network service is started, metadata is not
|
||||
# available. Exit without attempting to configure the elastic interface.
|
||||
if [ `/sbin/runlevel | /usr/bin/cut -d\ -f2` -ne 5 ]; then
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
# This file generates the old menu.lst configuration with grub2
|
||||
# It was copied from tomheadys github repo:
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ec2-get-credentials
|
||||
# Required-Start: $network
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description: Retrieve the ssh credentials and add to authorized_keys
|
||||
# Provides: ec2-get-credentials
|
||||
# Required-Start: $network
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description-Short: Retrieve the ssh credentials and add to authorized_keys
|
||||
# Description: Retrieve the ssh credentials and add to authorized_keys.
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
#
|
||||
# ec2-get-credentials - Retrieve the ssh credentials and add to authorized_keys
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ec2-run-user-data
|
||||
# Required-Start: ec2-get-credentials
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description: Run instance user-data if it looks like a script.
|
||||
# Provides: ec2-run-user-data
|
||||
# Required-Start: ec2-get-credentials
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Description-Short: Run instance user-data if it looks like a script
|
||||
# Description: Run instance user-data if it looks like a script.
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
### END INIT INFO
|
||||
#
|
||||
# Only retrieves and runs the user-data script once per instance. If
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
vm.swappiness = 0
|
||||
vm.dirty_ratio = 80
|
||||
vm.dirty_background_ratio = 5
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
# This file was created by bootstrap-vz.
|
||||
# See https://github.com/andsens/bootstrap-vz/blob/master/LICENSE for
|
||||
# legal notices and disclaimers.
|
||||
|
||||
function uname {
|
||||
if [[ $1 == '-r' ]]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue