mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-09 20:05:53 +00:00
* drop absolute path from configuration
* add configuration from cmake building * update submodules
This commit is contained in:
@ -30,6 +30,8 @@
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
class NetctlProfile;
|
||||
|
||||
@ -303,27 +305,27 @@ private:
|
||||
/**
|
||||
* @brief prefered interface for WiFi. Default is ""
|
||||
*/
|
||||
QString mainInterface = QString("");
|
||||
QString mainInterface = QString(PREFERED_IFACE);
|
||||
/**
|
||||
* @brief path to netctl command. Default is "/usr/bin/netctl"
|
||||
* @brief path to netctl command. Default is "netctl"
|
||||
*/
|
||||
QString netctlCommand = QString("/usr/bin/netctl");
|
||||
QString netctlCommand = QString(NETCTL_PATH);
|
||||
/**
|
||||
* @brief path to netctl-auto command. Default is "/usr/bin/netctl-auto"
|
||||
* @brief path to netctl-auto command. Default is "netctl-auto"
|
||||
*/
|
||||
QString netctlAutoCommand = QString("/usr/bin/netctl-auto");
|
||||
QString netctlAutoCommand = QString(NETCTLAUTO_PATH);
|
||||
/**
|
||||
* @brief netctl-auto service name. Default is "netctl-auto"
|
||||
*/
|
||||
QString netctlAutoService = QString("netctl-auto");
|
||||
QString netctlAutoService = QString(NETCTLAUTO_SERVICE);
|
||||
/**
|
||||
* @brief path to sudo command. Default is "/usr/bin/kdesu"
|
||||
* @brief path to sudo command. Default is "kdesu"
|
||||
*/
|
||||
QString sudoCommand = QString("/usr/bin/kdesu");
|
||||
QString sudoCommand = QString(SUDO_PATH);
|
||||
/**
|
||||
* @brief path to systemctl command. Default is "/usr/bin/systemctl"
|
||||
* @brief path to systemctl command. Default is "systemctl"
|
||||
*/
|
||||
QString systemctlCommand = QString("/usr/bin/systemctl");
|
||||
QString systemctlCommand = QString(SYSTEMCTL_PATH);
|
||||
// functions
|
||||
/**
|
||||
* @brief method which calls command
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief The NetctlProfile class interacts with netctl profiles
|
||||
@ -114,9 +116,9 @@ private:
|
||||
*/
|
||||
QDir *profileDirectory = nullptr;
|
||||
/**
|
||||
* @brief path to sudo command. Default is "/usr/bin/kdesu"
|
||||
* @brief path to sudo command. Default is "kdesu"
|
||||
*/
|
||||
QString sudoCommand = QString("/usr/bin/kdesu");
|
||||
QString sudoCommand = QString(SUDO_PATH);
|
||||
};
|
||||
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
class Netctl;
|
||||
class NetctlProfile;
|
||||
@ -184,31 +186,31 @@ private:
|
||||
/**
|
||||
* @brief path to ctrl_directory. Defaults is "/run/wpa_supplicant"
|
||||
*/
|
||||
QString ctrlDir = QString("/run/wpa_supplicant");
|
||||
QString ctrlDir = QString(CTRL_DIR);
|
||||
/**
|
||||
* @brief group which is owner of CTRL_DIR. Default is "users"
|
||||
*/
|
||||
QString ctrlGroup = QString("users");
|
||||
QString ctrlGroup = QString(CTRL_GROUP);
|
||||
/**
|
||||
* @brief wpa_supplicant PID file. $i is interface. Default is "/run/wpa_supplicant_$i.pid"
|
||||
*/
|
||||
QString pidFile = QString("/run/wpa_supplicant_$i.pid");
|
||||
QString pidFile = QString(PID_FILE);
|
||||
/**
|
||||
* @brief path to sudo command. Default is "/usr/bin/kdesu"
|
||||
* @brief path to sudo command. Default is "kdesu"
|
||||
*/
|
||||
QString sudoCommand = QString("/usr/bin/kdesu");
|
||||
QString sudoCommand = QString(SUDO_PATH);
|
||||
/**
|
||||
* @brief path to wpa_cli command. Default is "/usr/bin/wpa_cli"
|
||||
* @brief path to wpa_cli command. Default is "wpa_cli"
|
||||
*/
|
||||
QString wpaCliPath = QString("/usr/bin/wpa_cli");
|
||||
QString wpaCliPath = QString(WPACLI_PATH);
|
||||
/**
|
||||
* @brief wpa_supplicant drivers comma separated. Default is "nl80211,wext"
|
||||
*/
|
||||
QString wpaDrivers = QString("nl80211,wext");
|
||||
QString wpaDrivers = QString(WPA_DRIVERS);
|
||||
/**
|
||||
* @brief path to wpa_supplicant command. Default is "/usr/bin/wpa_supplicant"
|
||||
* @brief path to wpa_supplicant command. Default is "wpa_supplicant"
|
||||
*/
|
||||
QString wpaSupPath = QString("/usr/bin/wpa_supplicant");
|
||||
QString wpaSupPath = QString(WPASUP_PATH);
|
||||
// functions
|
||||
/**
|
||||
* @brief method which calls wpa_cli and returns its output
|
||||
|
@ -45,7 +45,7 @@ Netctl::Netctl(const bool debugCmd, const QMap<QString, QString> settings)
|
||||
if (settings.contains(QString("IFACE_DIR")))
|
||||
ifaceDirectory = new QDir(settings[QString("IFACE_DIR")]);
|
||||
else
|
||||
ifaceDirectory = new QDir(QString("/sys/class/net/"));
|
||||
ifaceDirectory = new QDir(QString(IFACE_DIR));
|
||||
if (settings.contains(QString("PREFERED_IFACE")))
|
||||
mainInterface = settings[QString("PREFERED_IFACE")];
|
||||
if (settings.contains(QString("NETCTL_PATH")))
|
||||
|
@ -46,7 +46,7 @@ NetctlProfile::NetctlProfile(const bool debugCmd, const QMap<QString, QString> s
|
||||
if (settings.contains(QString("PROFILE_DIR")))
|
||||
profileDirectory = new QDir(settings[QString("PROFILE_DIR")]);
|
||||
else
|
||||
profileDirectory = new QDir(QString("/etc/netctl/"));
|
||||
profileDirectory = new QDir(QString(PROFILE_DIR));
|
||||
if (settings.contains(QString("SUDO_PATH")))
|
||||
sudoCommand = settings[QString("SUDO_PATH")];
|
||||
if (settings.contains(QString("FORCE_SUDO")))
|
||||
|
Reference in New Issue
Block a user