File: tweak-defaults

package info (click to toggle)
libconfig-model-dpkg-perl 3.014
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,200 kB
  • sloc: perl: 8,255; python: 242; makefile: 77; javascript: 16; sh: 1
file content (53 lines) | stat: -rw-r--r-- 1,762 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description:Tweak defaults values for Debian
 Debian needs some default values slightly different
 from upstream
Forwarded:NA
Author:dod
--- a/lib/Config/Model/models/LCDd/server.pl
+++ b/lib/Config/Model/models/LCDd/server.pl
@@ -115,7 +115,27 @@
       },
       'DriverPath',
       {
-        'default' => 'server/drivers/',
+        compute => {
+            formula => 'my $triplet = `/usr/bin/dpkg-architecture -qDEB_HOST_MULTIARCH`;
+warn "cannot run dpkg-architecture" unless $triplet ;
+chomp $triplet;
+"/usr/lib/$triplet/lcdproc/";',
+            allow_override => 1,
+            use_eval => 1
+        },
+        warn_unless => {
+            'dir' => {
+                code => ' defined $_ ? -d : 1' ,
+                msg => 'missing DriverPath dir',
+                fix => 'my $triplet = `/usr/bin/dpkg-architecture -qDEB_HOST_MULTIARCH`;
+warn "cannot run dpkg-architecture" unless $triplet ;
+chomp $triplet;
+my $res = "/usr/lib/$triplet/lcdproc/";
+$_ = $res;
+',
+             }
+        },
+        #'default' => 'server/drivers/',
         'description' => 'Where can we find the driver modules ?
 IMPORTANT: Make sure to change this setting to reflect your
            specific setup! Otherwise LCDd won\'t be able to find
@@ -196,7 +216,7 @@
       {
         'description' => 'Should we report to syslog instead of stderr ? ',
         'type' => 'leaf',
-        'upstream_default' => 'no',
+        'default' => 'yes',
         'value_type' => 'boolean',
         'write_as' => [
           'no',
@@ -253,7 +273,6 @@
       },
       'User',
       {
-        'default' => 'nobody',
         'description' => 'User to run as.  LCDd will drop its root privileges, if any,
 and run as this user instead.',
         'type' => 'leaf',