Change ebuild layout

Package-Manager: portage-2.2.20
RepoMan-Options: --force
This commit is contained in:
Mario Fetka
2016-01-10 21:22:58 +01:00
parent 9f3c9b2c2a
commit 4498a08f26
9 changed files with 279 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#!/sbin/runscript
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# opts="${opts} reload configtest"
NX_SERVER_CMD="/usr/NX/bin/nxfaketime '2012-05-19 12:24:45' /usr/NX/bin/nxserver"
depend()
{
need net
use nxsensor
}
start() {
ebegin "Starting nxserver"
$NX_SERVER_CMD --start
if [ $? = 0 ]; then
$NX_SERVER_CMD --statistics start
eend $?
else
eend 1
fi
}
stop() {
ebegin "Stopping nxserver"
$NX_SERVER_CMD --stop
$NX_SERVER_CMD --statistics stop
eend 0
}

View File

@@ -0,0 +1,11 @@
--- scripts/setup/nxserver.orig 2008-11-24 10:24:26.000000000 +0100
+++ scripts/setup/nxserver 2008-11-24 10:27:38.000000000 +0100
@@ -3149,8 +3149,6 @@
# addNXinit
startNXStat
- updateAutorizedKey
-
checkStr=`$NXSHELL --upgradecheck 2>&1`
result=`echo "$checkStr" | grep -c "expired" 2>&1`
if [ "$result" != "0" ];

View File

@@ -0,0 +1,57 @@
--- scripts/setup/nxserver.orig 2012-05-19 11:45:03.000000000 +0200
+++ scripts/setup/nxserver 2013-01-21 22:40:41.958166294 +0100
@@ -967,6 +975,12 @@
}
addNXUserLinux () {
+
+ # does the NX user already exist?
+ if id nx > /dev/null 2>&1 ; then
+ return
+ fi
+
if [ "x$system" != "xdebian" ]
then
sysuser=`useradd --help 2>&1|grep "\-r"`;
@@ -2679,6 +2693,11 @@
system=fedora
fi
+if grep -q "ID=gentoo" /etc/os-release || [ -f /etc/gentoo-release ];
+then
+ system=gentoo
+fi
+
if [ "x$system" = "x" -a -f /etc/release ];
then
system=solaris
@@ -2713,6 +2732,7 @@
"mandrake" ) ;;
"fedora" ) ;;
"debian" ) ;;
+ "gentoo" ) ;;
"solaris" ) ;;
"" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;;
* ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;;
@@ -2892,21 +2912,6 @@
fi
fi
-
- result=`id nx 2>&1`
- if [ $? = 0 ];
- then
-# printMsg "Cannot add user: nx. User: nx already exists" "error"
-# printMsg "Please try to fix the problem by reinstalling the server" "error"
- printMsg "Cannot add user: nx" "error"
- printMsg "User: nx already exists" "error"
- printMsgNoDot "To fix the problem, you may try to completely uninstall NX"
- printMsgNoDot "Server and install it from scratch. If this is not enough,"
- printMsgNoDot "please delete the nx user by using the system commands and"
- printMsg "proceed with a new installation of NX Server"
- exit 1
- fi
-
LOGFILE="$INSTALLOG"
createLogdirectory
startLog

View File

@@ -0,0 +1,34 @@
--- a/usr/NX/scripts/setup/nxserver 2012-05-19 03:45:03.000000000 -0600
+++ b/usr/NX/scripts/setup/nxserver 2012-11-16 09:44:04.615561778 -0700
@@ -649,6 +649,11 @@
removeNXinit () {
+ if [ "$system" = "gentoo" ]; then
+ systemctl disable nxserver
+ return 0
+ fi
+
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ] || [ "$system" = "suse" ];
then
if [ -f "/sbin/chkconfig" ];
@@ -853,6 +858,11 @@
addNXinit () {
+ if [ "$system" = "gentoo" ]; then
+ systemctl enable nxserver
+ return 0
+ fi
+
runCommand "cat $NODE_ROOT/scripts/init/nxserver > /etc/init.d/nxserver" "Unable to create: '/etc/init.d/nxserver'" "warn"
runCommand "chmod +x /etc/init.d/nxserver" "Cannot set permissions of '/etc/init.d/nxserver' file" "warn"
@@ -2600,6 +2610,7 @@
echo " debian Debian Woody 3.0, Unstable, Ubuntu, etc."
echo " solaris Sun Solaris 8.0, 9.0, 10.0, etc."
echo " fedora Fedora Core 1, 2, 3, 4, 5, etc. "
+ echo " gentoo Gentoo Linux"
echo "$errMsg"

View File

@@ -0,0 +1,13 @@
[Unit]
Description=NoMachine NX Server
Requires=sshd.service
After=sshd.service
[Service]
ExecStart=/usr/NX/bin/nxfaketime '2012-05-19 12:24:45' /usr/NX/bin/nxserver --start
ExecStop=/usr/NX/bin/nxserver --shutdown
Type=oneshot
RemainAfterExit=true
[Install]
WantedBy=multi-user.target