add /update/features handler for feature negotiation
related to https://github.com/gokrazy/gokrazy/issues/52
This commit is contained in:
parent
ffc8928d2e
commit
057fc9dcb0
@ -109,6 +109,12 @@ func nonConcurrentSwitchHandler(newRootPartition int) func(http.ResponseWriter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initUpdate() error {
|
func initUpdate() error {
|
||||||
|
// The /update/features handler is used for negotiation of individual
|
||||||
|
// feature support (e.g. PARTUUID= support) between the packer and update
|
||||||
|
// target.
|
||||||
|
http.HandleFunc("/update/features", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
fmt.Fprintf(w, "partuuid,")
|
||||||
|
})
|
||||||
http.HandleFunc("/update/mbr", nonConcurrentUpdateHandler(rootdev.BlockDevice()))
|
http.HandleFunc("/update/mbr", nonConcurrentUpdateHandler(rootdev.BlockDevice()))
|
||||||
http.HandleFunc("/update/root", nonConcurrentUpdateHandler(rootdev.Partition(rootdev.InactiveRootPartition())))
|
http.HandleFunc("/update/root", nonConcurrentUpdateHandler(rootdev.Partition(rootdev.InactiveRootPartition())))
|
||||||
http.HandleFunc("/update/switch", nonConcurrentSwitchHandler(rootdev.InactiveRootPartition()))
|
http.HandleFunc("/update/switch", nonConcurrentSwitchHandler(rootdev.InactiveRootPartition()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user