mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
Merge pull request #2164 from rn/meta
Allow metadata package to over write existing config files
This commit is contained in:
commit
c3bc803445
@ -10,7 +10,7 @@ init:
|
||||
onboot:
|
||||
# support metadata for optional config in /var/config
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:231fa2a96626af8af6224d2f1d2d71d833f370ea"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
- name: sysctl
|
||||
image: "linuxkit/sysctl:d1a43c7c91e92374766f962dc8534cf9508756b0"
|
||||
- name: sysfs
|
||||
|
@ -13,7 +13,7 @@ onboot:
|
||||
image: "linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:231fa2a96626af8af6224d2f1d2d71d833f370ea"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: rngd
|
||||
image: "linuxkit/rngd:1516d5d70683a5d925fe475eb1b6164a2f67ac3b"
|
||||
|
@ -13,7 +13,7 @@ onboot:
|
||||
image: "linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:231fa2a96626af8af6224d2f1d2d71d833f370ea"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:5ab31289889d61a5d2ecbeea8e36ce74ac54737c"
|
||||
|
@ -13,7 +13,7 @@ onboot:
|
||||
image: "linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:231fa2a96626af8af6224d2f1d2d71d833f370ea"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:5ab31289889d61a5d2ecbeea8e36ce74ac54737c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM linuxkit/alpine:9bcf61f605ef0ce36cc94d59b8eac307862de6e1 AS mirror
|
||||
FROM linuxkit/alpine:2e362f4459ba4491655061cccdd2fcc7a2de5eb3 AS mirror
|
||||
|
||||
RUN apk add --no-cache go musl-dev
|
||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||
|
@ -70,7 +70,7 @@ func main() {
|
||||
}
|
||||
if !found {
|
||||
log.Printf("Trying CDROM")
|
||||
if err := os.Mkdir(MountPoint, 0755); err != nil {
|
||||
if err := os.MkdirAll(MountPoint, 0755); err != nil {
|
||||
log.Printf("CDROM: Failed to create %s: %s", MountPoint, err)
|
||||
goto ErrorOut
|
||||
}
|
||||
@ -157,7 +157,7 @@ func processUserData(data []byte) error {
|
||||
}
|
||||
for d, val := range cm {
|
||||
dir := path.Join(ConfigPath, d)
|
||||
if err := os.Mkdir(dir, 0755); err != nil {
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
log.Printf("Failed to create %s: %s", dir, err)
|
||||
continue
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ onboot:
|
||||
image: "linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:4e73345cdcb4f7e9df07b0ee7aede652960297f2"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: rngd
|
||||
image: "linuxkit/rngd:1516d5d70683a5d925fe475eb1b6164a2f67ac3b"
|
||||
|
@ -13,7 +13,7 @@ onboot:
|
||||
image: "linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:4e73345cdcb4f7e9df07b0ee7aede652960297f2"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: rngd
|
||||
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9"
|
||||
|
@ -20,7 +20,7 @@ onboot:
|
||||
image: "linuxkit/mount:b24bd97ae43397b469dbaadd80f17f291c817bdf"
|
||||
command: ["/mount.sh", "/var/lib/swarmd"]
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:4e73345cdcb4f7e9df07b0ee7aede652960297f2"
|
||||
image: "linuxkit/metadata:f122f1b4e873f1d08cd67bd9105385fd923af0cb"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:9f27c1272b6d128c9a09745e916f151d09cb0d27"
|
||||
|
Loading…
Reference in New Issue
Block a user