[ Agent ] [ App ] - offline build nfs server - 2
This commit is contained in:
@@ -1098,6 +1098,9 @@ func (op *AgentOsOperator) installNfsOnlineExec() (bool, []string) {
|
||||
|
||||
func (op *AgentOsOperator) installNFSOfflineExec() (bool, []string) {
|
||||
|
||||
log.InfoF("[installNFSOfflineExec] - start to install nfs-client offline !")
|
||||
BasicCreateFolder("/root/install")
|
||||
|
||||
// check for version
|
||||
executor, i := HardCodeCommandExecutor("grep PRETTY_NAME /etc/os-release | cut -d= -f2 | tr -d '\"' | sed 's/ /-/g'")
|
||||
if !executor {
|
||||
@@ -1121,13 +1124,15 @@ func (op *AgentOsOperator) installNFSOfflineExec() (bool, []string) {
|
||||
"/root/install",
|
||||
})
|
||||
|
||||
// install
|
||||
AllCommandExecutor([]string{
|
||||
"dpkg",
|
||||
"-i",
|
||||
"/root/install/tmp/nfs-client/*.deb",
|
||||
"rm",
|
||||
"-rf",
|
||||
"/root/install/tmp",
|
||||
})
|
||||
|
||||
// install
|
||||
BasicPrettyPrint(HardCodeCommandExecutor("dpkg -i /root/install/tmp/nfs-client/*.deb"))
|
||||
|
||||
ok, resultLog = BasicSystemdUp("nfs")
|
||||
if !ok {
|
||||
return false, append(resultLog, "[installNFSOfflineExec] - start nfs-common.service failed !")
|
||||
|
||||
Reference in New Issue
Block a user