"host1.example.org",
},
Files: map[string]*safcm.File{
- "/": &safcm.File{Path: "/",
+ "/": {Path: "/",
OrigGroup: "group",
Mode: fs.ModeDir | 0755 | fs.ModeSetgid,
Uid: -1,
"touch /.update",
},
},
- "/etc": &safcm.File{
+ "/etc": {
OrigGroup: "group",
Path: "/etc",
Mode: fs.ModeDir | 0755,
Uid: -1,
Gid: -1,
},
- "/etc/.hidden": &safcm.File{
+ "/etc/.hidden": {
OrigGroup: "group",
Path: "/etc/.hidden",
Mode: 0100 | fs.ModeSetuid | fs.ModeSetgid | fs.ModeSticky,
Gid: -1,
Data: []byte("..."),
},
- "/etc/motd": &safcm.File{
+ "/etc/motd": {
OrigGroup: "group",
Path: "/etc/motd",
Mode: 0644,
Gid: -1,
Data: []byte("Welcome to Host ONE\n\n\n\n\n\nall\n\n\nhost1.example.org\n\n\n\n"),
},
- "/etc/rc.local": &safcm.File{
+ "/etc/rc.local": {
OrigGroup: "group",
Path: "/etc/rc.local",
Mode: 0700,
"/etc/rc.local",
},
},
- "/etc/resolv.conf": &safcm.File{
+ "/etc/resolv.conf": {
OrigGroup: "group",
Path: "/etc/resolv.conf",
Mode: 0641,
"echo resolv.conf updated",
},
},
- "/etc/test": &safcm.File{
+ "/etc/test": {
OrigGroup: "group",
Path: "/etc/test",
Mode: os.ModeSymlink | 0777,
nil,
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0640,
Data: []byte("line\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("line\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: 0641,
Data: []byte("# line with spaces\nline with spaces\n"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: fs.ModeSymlink | 0777,
Data: []byte("target"),
},
[]ft.File{
root,
- ft.File{
+ {
Path: "file",
Mode: fs.ModeNamedPipe | 0640,
},
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
[][]byte{nil, nil},
[]error{nil, nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
nil,
fmt.Errorf("fake error"),
},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
[]byte("fake stderr"),
},
[]error{nil, nil, nil, nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
nil,
fmt.Errorf("fake error"),
},
- []*exec.Cmd{&exec.Cmd{
+ []*exec.Cmd{{
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
- }, &exec.Cmd{
+ }, {
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",