mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 15:13:52 +01:00
Debian postinst aufgenommen für Infos der Konfig-Migration
Puffer für PLC Prozess auf 0 gesetzt gegen hängenden Start von Popen
This commit is contained in:
27
debian/postinst
vendored
Executable file
27
debian/postinst
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
cat <<-END
|
||||
|
||||
======= Important RevPiPyLoad post-installation note =======
|
||||
|
||||
If you upgrade from pre 0.6.5 Version,you have to migrate to the
|
||||
new config file format!!!
|
||||
/etc/revpipyload/revpipyload.conf
|
||||
|
||||
READ:
|
||||
DE: https://revpimodio.org/revpipyplc-auf-065/
|
||||
EN: https://revpimodio.org/en/revpipyplc-to-064/
|
||||
|
||||
END
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
@@ -77,6 +77,8 @@ class RevPiPlc(Thread):
|
||||
|
||||
def _setuppopen(self):
|
||||
"""Setzt UID und GID fuer das PLC Programm."""
|
||||
proginit.logger.debug("enter RevPiPlc._setuppopen()")
|
||||
|
||||
proginit.logger.info(
|
||||
"set uid {0} and gid {1} for plc program".format(
|
||||
self.uid, self.gid)
|
||||
@@ -84,6 +86,8 @@ class RevPiPlc(Thread):
|
||||
os.setgid(self.gid)
|
||||
os.setuid(self.uid)
|
||||
|
||||
proginit.logger.debug("leave RevPiPlc._setuppopen()")
|
||||
|
||||
def _spopen(self, lst_proc):
|
||||
"""Startet das PLC Programm.
|
||||
@param lst_proc Prozessliste
|
||||
@@ -94,7 +98,7 @@ class RevPiPlc(Thread):
|
||||
lst_proc,
|
||||
preexec_fn=self._setuppopen,
|
||||
cwd=os.path.dirname(self._program),
|
||||
bufsize=1,
|
||||
bufsize=0,
|
||||
stdout=sysstdout if self._plw is None else self._plw.fdw,
|
||||
stderr=subprocess.STDOUT
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user