This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
272 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VyOS contributors, including: | ||
|
||
Yuya Kusakabe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
debian/changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cfgdir = $(datadir)/vyatta-cfg/templates | ||
opdir = $(datadir)/vyatta-op/templates | ||
curverdir = $(sysconfdir)/config-migrate/current | ||
bin_sudo_usersdir = $(bindir)/sudo-users | ||
|
||
vprefix = /opt/vyatta | ||
vsbindir = $(vprefix)/sbin | ||
|
||
sbin_SCRIPTS = | ||
sbin_SCRIPTS += scripts/vyos-cloudinit | ||
|
||
bin_sudo_users_SCRIPTS = | ||
|
||
curver_DATA = | ||
|
||
cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ | ||
cpio -0pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
None at this time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vyos-cloudinit enables a user to customize VyOS machines by providing either a vyos-config document or an executable script through user-data. | ||
|
||
See README.md for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# vyos-cloudinit | ||
|
||
vyos-cloudinit enables a user to customize VyOS machines by providing either a VyOS config document or an executable script through user-data. | ||
|
||
## Configuration with vyos-config | ||
|
||
vyos-cloudinit doesn't support cloud-init spec, but supports VyOS config spec. | ||
|
||
The following is an example VyOS config document: | ||
|
||
``` | ||
#vyos-config | ||
system { | ||
host-name hoge | ||
} | ||
``` | ||
|
||
## Executing a Script | ||
|
||
vyos-cloudinit supports executing user-data as a script instead of parsing it as a VyOS config document. | ||
|
||
The following is an example script: | ||
|
||
``` | ||
#!/bin/vbash | ||
source /opt/vyatta/etc/functions/script-template | ||
set system hostname hoge | ||
commit | ||
save | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Process this file with autoconf to produce a configure script. | ||
AC_PREREQ(2.59) | ||
|
||
m4_define([VERSION_ID], [m4_esyscmd([ | ||
if test -f .version ; then | ||
head -n 1 .version | tr -d \\n | ||
else | ||
echo -n 2.4 | ||
fi])]) | ||
AC_INIT([vyos-vxlan], VERSION_ID, [[email protected]]) | ||
|
||
test -n "$VYATTA_VERSION" || VYATTA_VERSION=$PACKAGE_VERSION | ||
|
||
AC_CONFIG_AUX_DIR([config]) | ||
AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2 subdir-objects]) | ||
AC_PREFIX_DEFAULT([/opt/vyatta]) | ||
|
||
AC_ARG_ENABLE([nostrip], | ||
AC_HELP_STRING([--enable-nostrip], | ||
[include -nostrip option during packaging]), | ||
[NOSTRIP=-nostrip], [NOSTRIP=]) | ||
|
||
AC_CONFIG_FILES([Makefile]) | ||
|
||
AC_SUBST(NOSTRIP) | ||
|
||
AC_PROG_CC | ||
AC_PROG_CXX | ||
AM_PROG_AS | ||
AM_PROG_CC_C_O | ||
AC_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The Debian Package vyos-cloudinit | ||
--------------------------------- | ||
|
||
This package is a VyOS cloudinit. | ||
|
||
-- Yuya Kusakabe <[email protected]> Thu, 15 Dec 2016 15:11:43 +0900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
|
||
rm -rf config | ||
rm -f aclocal.m4 config.guess config.statusconfig.sub configure INSTALL | ||
|
||
autoreconf --force --install | ||
|
||
rm -f config.sub config.guess | ||
ln -s /usr/share/misc/config.sub . | ||
ln -s /usr/share/misc/config.guess . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
vyos-cloudinit (0.0.1) unstable; urgency=low | ||
|
||
* Initial release. | ||
|
||
-- Yuya Kusakabe <[email protected]> Thu, 15 Dec 2016 15:11:43 +0900 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Source: vyos-cloudinit | ||
Section: admin | ||
Priority: extra | ||
Maintainer: VyOS Maintainers <[email protected]> | ||
Standards-Version: 3.9.1 | ||
Build-Depends: debhelper (>= 5), autotools-dev, autoconf | ||
|
||
Package: vyos-cloudinit | ||
Architecture: all | ||
Depends: vyatta-cfg-system, | ||
vyatta-cfg, | ||
vyatta-op, | ||
${misc:Depends} | ||
Replaces: vyos-cloudinit | ||
Description: vyos-cloudinit | ||
vyos-cloudinit enables a user to customize VyOS machines by providing either a VyOS config document or an executable script through user-data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
This package was debianized by Yuya Kusakabe <[email protected]> on | ||
Thu, 15 Dec 2016. | ||
|
||
It's original content from the GIT repository | ||
<https://github.com/higebu/vyos-cloudinit> | ||
|
||
Upstream Author: | ||
|
||
Yuya Kusakabe <[email protected]> | ||
|
||
Copyright: | ||
|
||
Copyright (C) 2016 VyOS Development Group, Inc. | ||
All Rights Reserved. | ||
|
||
License: | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2, or (at your option) | ||
any later version. | ||
|
||
This program is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
General Public License for more details. | ||
|
||
A copy of the GNU General Public License is available as | ||
`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution | ||
or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. | ||
You can also obtain it by writing to the Free Software Foundation, | ||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | ||
MA 02110-1301, USA. | ||
|
||
The Debian packaging is (C) 2016, Yuya Kusakabe <[email protected]> and | ||
is licensed under the GPL, see above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NEWS | ||
README |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vyos-cloudinit: file-in-unusual-dir | ||
vyos-cloudinit: dir-or-file-in-opt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
# Sample debian/rules that uses debhelper. | ||
# This file was originally written by Joey Hess and Craig Small. | ||
# As a special exception, when this file is copied by dh-make into a | ||
# dh-make output file, you may use that output file without restriction. | ||
# This special exception was added by Craig Small in version 0.37 of dh-make. | ||
|
||
# Uncomment this to turn on verbose mode. | ||
#export DH_VERBOSE=1 | ||
|
||
|
||
# These are used for cross-compiling and for saving the configure script | ||
# from having to guess our platform (since we know it already) | ||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) | ||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) | ||
PACKAGE=vyos-cloudinit | ||
PKGDIR=$(CURDIR)/debian/$(PACKAGE) | ||
|
||
CFLAGS = -Wall -g | ||
|
||
configure = ./configure | ||
configure += --host=$(DEB_HOST_GNU_TYPE) | ||
configure += --build=$(DEB_BUILD_GNU_TYPE) | ||
configure += --prefix=/opt/vyatta | ||
configure += --mandir=\$${prefix}/share/man | ||
configure += --infodir=\$${prefix}/share/info | ||
configure += CFLAGS="$(CFLAGS)" | ||
configure += LDFLAGS="-Wl,-z,defs" | ||
|
||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | ||
CFLAGS += -O0 | ||
else | ||
CFLAGS += -O2 | ||
endif | ||
|
||
configure: configure.ac Makefile.am | ||
chmod +x debian/autogen.sh | ||
debian/autogen.sh | ||
|
||
config.status: configure | ||
dh_testdir | ||
rm -f config.cache | ||
$(configure) | ||
|
||
build: build-stamp | ||
|
||
build-stamp: config.status | ||
dh_testdir | ||
$(MAKE) | ||
touch $@ | ||
|
||
clean: clean-patched | ||
|
||
# Clean everything up, including everything auto-generated | ||
# at build time that needs not to be kept around in the Debian diff | ||
clean-patched: | ||
dh_testdir | ||
dh_testroot | ||
if test -f Makefile ; then $(MAKE) clean distclean ; fi | ||
rm -f build-stamp | ||
rm -f config.status config.sub config.guess config.log | ||
rm -f aclocal.m4 configure Makefile.in Makefile INSTALL | ||
rm -rf config | ||
dh_clean | ||
|
||
install: build | ||
dh_testdir | ||
dh_testroot | ||
dh_clean -k | ||
dh_installdirs | ||
|
||
$(MAKE) DESTDIR=$(PKGDIR) install | ||
|
||
install -D --mode=0644 debian/lintian $(PKGDIR)/usr/share/lintian/overrides/$(PACKAGE) | ||
|
||
# Build architecture-independent files here. | ||
binary-indep: build install | ||
rm -f debian/files | ||
dh_testdir | ||
dh_testroot | ||
dh_installchangelogs ChangeLog | ||
dh_installdocs | ||
dh_install | ||
dh_installdebconf | ||
dh_link | ||
dh_strip | ||
dh_compress | ||
dh_fixperms | ||
dh_installdeb | ||
if [ -f "../.VYATTA_DEV_BUILD" ]; then \ | ||
dh_gencontrol -- -v999.dev; \ | ||
else \ | ||
dh_gencontrol; \ | ||
fi | ||
dh_md5sums | ||
dh_builddeb | ||
|
||
# Build architecture-dependent files here. | ||
binary-arch: build install | ||
# This is an architecture independent package | ||
# so; we have nothing to do by default. | ||
|
||
binary: binary-indep binary-arch | ||
.PHONY: build clean binary-indep binary-arch binary install |