From 89181cbf0fe21cc73359a11cf713f1106c05a530 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 9 Nov 2015 09:37:23 +0000 Subject: [PATCH] add windows Signed-off-by: Vasiliy Tolstov --- build | 6 ++++-- system/filesystem_windows.go | 20 ++++++++++++++++++++ system/networkd_windows.go | 21 +++++++++++++++++++++ system/user_windows.go | 29 +++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 system/filesystem_windows.go create mode 100644 system/networkd_windows.go create mode 100644 system/user_windows.go diff --git a/build b/build index 0a047b1..caa6394 100755 --- a/build +++ b/build @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/bin/bash -x ORG_PATH="github.com/coreos" REPO_PATH="${ORG_PATH}/coreos-cloudinit" @@ -29,7 +29,9 @@ if [ ! -h $GOPATH/src/${REPO_PATH} ]; then ln -s ../../../.. $GOPATH/src/${REPO_PATH} || echo "exit 255" fi -for os in linux freebsd netbsd openbsd; do +set -e + +for os in linux freebsd netbsd openbsd windows; do GOOS=${os} go build -x -ldflags "${GLDFLAGS}" -tags netgo -o bin/cloudinit-${os}-x86_64 ${REPO_PATH} GOOS=${os} GOARCH=386 go build -x -ldflags "${GLDFLAGS}" -tags netgo -o bin/cloudinit-${os}-x86_32 ${REPO_PATH} done diff --git a/system/filesystem_windows.go b/system/filesystem_windows.go new file mode 100644 index 0000000..3a0a41b --- /dev/null +++ b/system/filesystem_windows.go @@ -0,0 +1,20 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +func ResizeRootFS() error { + + return nil +} diff --git a/system/networkd_windows.go b/system/networkd_windows.go new file mode 100644 index 0000000..d439018 --- /dev/null +++ b/system/networkd_windows.go @@ -0,0 +1,21 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import "github.com/coreos/coreos-cloudinit/network" + +func RestartNetwork(interfaces []network.InterfaceGenerator) (err error) { + return nil +} diff --git a/system/user_windows.go b/system/user_windows.go new file mode 100644 index 0000000..13b6e20 --- /dev/null +++ b/system/user_windows.go @@ -0,0 +1,29 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import "github.com/coreos/coreos-cloudinit/config" + +func CreateUser(u *config.User) error { + return nil +} + +func LockUnlockUser(u *config.User) error { + return nil +} + +func SetUserPassword(user, hash string) error { + return nil +}