mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
Make sure that the beadm backend can run if beadm is in base
This commit is contained in:
@@ -42,7 +42,7 @@ RestOutputStruct::ExitCode WebSocket::AvailableSubsystems(bool allaccess, QJsonO
|
||||
out->insert("rpc/logs", allaccess ? "read/write" : "read");
|
||||
|
||||
// - beadm
|
||||
if(QFile::exists("/usr/local/sbin/beadm")){
|
||||
if(QFile::exists("/usr/local/sbin/beadm") || QFile::exists("/sbin/beadm") ){
|
||||
out->insert("sysadm/beadm", "read/write");
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ QJsonObject BEADM::listBEs() {
|
||||
|
||||
QJsonObject BEADM::renameBE(QJsonObject jsin) {
|
||||
QJsonObject retObject;
|
||||
|
||||
|
||||
QStringList keys = jsin.keys();
|
||||
if (! keys.contains("source") || ! keys.contains("target") ) {
|
||||
retObject.insert("error", "Missing required key(s) 'source / target'");
|
||||
@@ -71,7 +71,7 @@ QJsonObject BEADM::listBEs() {
|
||||
return retObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
retObject.insert("source", source);
|
||||
retObject.insert("target", target);
|
||||
return retObject;
|
||||
@@ -191,7 +191,7 @@ QJsonObject BEADM::listBEs() {
|
||||
QString mountpoint;
|
||||
if (keys.contains("mountpoint") ) {
|
||||
mountpoint = jsin.value("mountpoint").toString();
|
||||
}
|
||||
}
|
||||
|
||||
QStringList output = General::RunCommand("beadm mount "+ be + " " + mountpoint).split("\n");
|
||||
|
||||
@@ -209,7 +209,7 @@ QJsonObject BEADM::listBEs() {
|
||||
|
||||
return retObject;
|
||||
}
|
||||
|
||||
|
||||
// Unmount the given boot environment immediately. Confirmation should be done through the client.
|
||||
|
||||
QJsonObject BEADM::umountBE(QJsonObject jsin) {
|
||||
|
||||
Reference in New Issue
Block a user