conflicts between shutdown hooks of nvram-wakeup and e.g. noad
Darren Salt
pkg-vdr-dvb-devel@lists.alioth.debian.org
Wed, 19 Jan 2005 00:34:43 +0000
This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this
message to resend it in a different format.
--1420689--411636321--1295266899
Content-Type: text/plain; charset=us-ascii
I demand that Thomas Schmidt may or may not have written...
> * Christoph Martin schrieb am 14.01.05, um 12:04 Uhr:
>> In C you have:
>> getuid returns the real user ID of the current process.
>> geteuid returns the effective user ID of the current process.
>> But personaly I wood use a suid-perl script to do this. There you have the
>> variable $< and $> which give you the uids. suid-perl is better equipped
>> for security checks in suid scripts. You have to use taint checking etc.
> Well, my perl-knowledge is not very good, so i will keep the very simple
> C program for now, but the suid-perl script will be my first point on the
> TODO for vdr 1.2.6-7 (Mainly because then we can make the package vdr Arch:
> all again.) ;-)
Why, when you can reduce the overall size of the VDR packages by getting rid
of vdr-kbd, vdr-daemon, vdr-rcu and vdr-lirc?
The attached patch (which I use in my vdr packages) will help here. You'll
probably need to apply it manually, though...
--
| Darren Salt | nr. Ashington, | linux (or ds) at
| woody, sarge, | Northumberland | youmustbejoking
| RISC OS | Toon Army | demon co uk
| We've got Shearer, you haven't
War spares not the brave, but the cowardly.
--1420689--411636321--1295266899
Content-Type: text/plain; charset=iso-8859-1; name="vdr_all-in-one.patch"
Content-Disposition: attachment; filename="vdr_all-in-one.patch"
Content-Transfer-Encoding: quoted-printable
diff -urNad vdr-1.3.18/Makefile vdr-1.3.18/Makefile
--- vdr-1.3.18/Makefile 2005-01-16 21:13:59.000000000 +0000
+++ vdr-1.3.18/Makefile 2005-01-16 21:13:59.000000000 +0000
@@ -61,11 +61,10 @@
OSDFONT_ISO8859_15 =3D -adobe-helvetica-medium-r-normal--23-*-100-100-p-=
*-iso8859-15
SMLFONT_ISO8859_15 =3D -adobe-helvetica-medium-r-normal--18-*-100-100-p-=
*-iso8859-15
=20
-ifndef NO_KBD
-DEFINES +=3D -DREMOTE_KBD
-endif
+REMOTE_LIRC ?=3D /dev/lircd
+REMOTE_RCU ?=3D /dev/ttyS1
=20
-DEFINES +=3D -DREMOTE_$(REMOTE)
+DEFINES +=3D -DREMOTE_RCU=3D\"$(REMOTE_RCU)\" -DREMOTE_LIRC=3D\"$(REMOTE=
_LIRC)\"
=20
DEFINES +=3D -DCMD_SUBMENUS
DEFINES +=3D -D_GNU_SOURCE
diff -urNad vdr-1.3.18/vdr.1 vdr-1.3.18/vdr.1
--- vdr-1.3.18/vdr.1 2005-01-16 21:13:59.000000000 +0000
+++ vdr-1.3.18/vdr.1 2005-01-16 21:13:59.000000000 +0000
@@ -46,7 +46,18 @@
(default is to read them from the video directory).
.TP
.B \-d, \-\-daemon
-Run in daemon mode.
+Run in daemon mode. (This implies \-\-no\-kbd.)
+.TP
+.B \-\-no\-kbd
+Don't use the keyboard as an input device.
+.TP
+.BI \-\-lirc [=3DDEVICE]
+If this option is present, vdr will use a LIRC remote control device.
+If the device name is omitted, vdr uses \fI/dev/lircd\fR.
+.TP
+.BI \-\-rcu [=3DDEVICE]
+If this option is present, vdr will use a serial port remote control dev=
ice.
+If the device name is omitted, vdr uses \fI/dev/ttyS1\fR.
.TP
.BI \-D\ num ,\ \-\-device=3D num
Use only the given DVB device (\fInum\fR =3D 0, 1, 2...).
diff -urNad vdr-1.3.18/vdr.c vdr-1.3.18/vdr.c
--- vdr-1.3.18/vdr.c 2005-01-16 21:13:59.000000000 +0000
+++ vdr-1.3.18/vdr.c 2005-01-16 21:13:59.000000000 +0000
@@ -142,6 +142,8 @@
int WatchdogTimeout =3D DEFAULTWATCHDOG;
const char *Terminal =3D NULL;
const char *Shutdown =3D NULL;
+ const char *rcu =3D NULL, *lirc =3D NULL;
+ int kbd =3D 1;
cPluginManager PluginManager(DEFAULTPLUGINDIR);
int ExitCode =3D 0;
=20
@@ -163,6 +165,9 @@
{ "version", no_argument, NULL, 'V' },
{ "video", required_argument, NULL, 'v' },
{ "watchdog", required_argument, NULL, 'w' },
+ { "no-kbd", no_argument, NULL, 'k'&31 },
+ { "rcu", optional_argument, NULL, 'r'&31 },
+ { "lirc", optional_argument, NULL, 'l'&31 },
{ NULL }
};
=20
@@ -267,6 +272,15 @@
fprintf(stderr, "vdr: invalid watchdog timeout: %s\n=
", optarg);
return 2;
break;
+ case 'k'&31:
+ kbd =3D 0;
+ break;
+ case 'r'&31:
+ rcu =3D optarg ? : REMOTE_RCU;
+ break;
+ case 'l'&31:
+ lirc =3D optarg ? : REMOTE_LIRC;
+ break;
default: return 2;
}
}
@@ -311,6 +325,11 @@
" -V, --version print version information and=
exit\n"
" -w SEC, --watchdog=3DSEC activate the watchdog timer=
with a timeout of SEC\n"
" seconds (default: %d); '0' di=
sables the watchdog\n"
+ " --no-kbd don't use the keyboard as an =
input device\n"
+ " --rcu[=3DPATH] use a remote control device=
, attached to PATH\n"
+ " (default: " REMOTE_RCU ")\n"
+ " --lirc use a LIRC remote control dev=
ice, attached to PATH\n"
+ " (default: " REMOTE_LIRC ")\n"=
"\n",
DEFAULTEPGDATAFILENAME,
DEFAULTPLUGINDIR,
@@ -506,15 +525,12 @@
cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()=
->Theme());
=20
// Remote Controls:
-#if defined(REMOTE_RCU)
- new cRcuRemote("/dev/ttyS1");
-#elif defined(REMOTE_LIRC)
- new cLircRemote("/dev/lircd");
-#endif
-#if defined(REMOTE_KBD)
- if (!DaemonMode && HasStdin)
+ if (rcu)
+ new cRcuRemote((char*)rcu);
+ if (lirc)
+ new cLircRemote((char*)lirc);
+ if (!DaemonMode && HasStdin && kbd)
new cKbdRemote;
-#endif
Interface->LearnKeys();
=20
// External audio:
--1420689--411636321--1295266899--