summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2020-11-06 21:24:53 +0100
committerChristian Hesse2020-11-06 21:24:53 +0100
commitb09212d82f4f80f462e90875952d0886c7b5de72 (patch)
tree6d983865d5e80d2c4ec6a1cda3e67cf147c7bb72
parent3dc682048aa6299ad6d159965a0cedb219d28447 (diff)
downloadaur-b09212d82f4f80f462e90875952d0886c7b5de72.tar.gz
update netinstall.c
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--netinstall.c8
3 files changed, 7 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5e06b3edaea9..29012e7eae37 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -14,7 +14,7 @@ pkgbase = netinstall
source = netinstall.c
source = netinstall.desktop
sha256sums = c27212f20520ccdae2eb8df78b3ebe146707c9c4464d3daacc23abad5f0e1699
- sha256sums = 0788e62837867c93147988ff3fbd8b005aa21af7a46fd0faec97fe1e38b2af95
+ sha256sums = 9e96737ac5ba6c83579c7f816ed72786ef0caa9db30c7b4626379048250f5187
sha256sums = 742b8ebf2b66697f24a27b5e6920dd4a4b92dec0fea928e8f58e499246284623
pkgname = netinstall
diff --git a/PKGBUILD b/PKGBUILD
index bb9ed06f794a..928c2a2ac607 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,7 @@ source=("https://download.mikrotik.com/routeros/${pkgver}/netinstall-${pkgver}.z
'netinstall.c'
'netinstall.desktop')
sha256sums=('c27212f20520ccdae2eb8df78b3ebe146707c9c4464d3daacc23abad5f0e1699'
- '0788e62837867c93147988ff3fbd8b005aa21af7a46fd0faec97fe1e38b2af95'
+ '9e96737ac5ba6c83579c7f816ed72786ef0caa9db30c7b4626379048250f5187'
'742b8ebf2b66697f24a27b5e6920dd4a4b92dec0fea928e8f58e499246284623')
build() {
diff --git a/netinstall.c b/netinstall.c
index 89b8b582d2a0..7a63d1866d5b 100644
--- a/netinstall.c
+++ b/netinstall.c
@@ -16,6 +16,9 @@
#include <sys/stat.h>
#include <unistd.h>
+#define WINE_PATH "/usr/bin/wine"
+#define NETINSTALL_EXE_PATH "/usr/share/netinstall/netinstall.exe"
+
int main(int argc, char ** argv) {
cap_value_t newcap[1];
cap_t caps = cap_get_proc();
@@ -56,9 +59,8 @@ int main(int argc, char ** argv) {
}
}
- const char *pathname = "/usr/bin/wine";
- char * const newargv[] = { "wine", "/usr/share/netinstall/netinstall.exe", NULL };
- execv(pathname, newargv);
+ char * const newargv[] = { "wine", NETINSTALL_EXE_PATH, NULL };
+ execv(WINE_PATH, newargv);
/* execv() returns only on error */
perror("execv");