mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-24 11:58:12 +01:00
build: naming cosmetic.
This commit is contained in:
parent
9953cf1fbd
commit
ba067a0214
2 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ func Configure() {
|
||||||
sync, _ := prepare.Tasks["synchronise"].(*prepare.Synchronise)
|
sync, _ := prepare.Tasks["synchronise"].(*prepare.Synchronise)
|
||||||
sync.Paths = []string{file}
|
sync.Paths = []string{file}
|
||||||
overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite)
|
overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite)
|
||||||
overwrite.OneFile = true
|
overwrite.Optional = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ const ext = ".apparmor.d"
|
||||||
|
|
||||||
type Overwrite struct {
|
type Overwrite struct {
|
||||||
prebuild.Base
|
prebuild.Base
|
||||||
OneFile bool
|
Optional bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -24,7 +24,7 @@ func init() {
|
||||||
Keyword: "overwrite",
|
Keyword: "overwrite",
|
||||||
Msg: "Overwrite dummy upstream profiles",
|
Msg: "Overwrite dummy upstream profiles",
|
||||||
},
|
},
|
||||||
OneFile: false,
|
Optional: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ func (p Overwrite) Apply() ([]string, error) {
|
||||||
for _, name := range path.MustReadFilteredFileAsLines() {
|
for _, name := range path.MustReadFilteredFileAsLines() {
|
||||||
origin := prebuild.RootApparmord.Join(name)
|
origin := prebuild.RootApparmord.Join(name)
|
||||||
dest := prebuild.RootApparmord.Join(name + ext)
|
dest := prebuild.RootApparmord.Join(name + ext)
|
||||||
if !dest.Exist() && p.OneFile {
|
if !dest.Exist() && p.Optional {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if origin.Exist() {
|
if origin.Exist() {
|
||||||
|
|
Loading…
Reference in a new issue