eed71a7920
Change-Id: I3822e0073e3a3b77ed795498084619ea02f34a84
30 lines
806 B
Smarty
30 lines
806 B
Smarty
#!/bin/bash
|
|
|
|
{{/*
|
|
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.
|
|
*/}}
|
|
|
|
set -ex
|
|
|
|
# ASAP2
|
|
for cfg in $(cat /tmp/netoffload | jq -r '(.asap2 // [])[] | @base64'); do
|
|
_jq() {
|
|
echo ${cfg} | base64 --decode | jq -r ${1}
|
|
}
|
|
|
|
DEVICE=$(_jq '.dev')
|
|
VFS=$(_jq '.vfs')
|
|
|
|
offloadctl enable asap2 ${DEVICE} --vfs ${VFS}
|
|
done
|