blob: 4cf50f64faea6b9bc28819a46b820164e64fabee (
plain)
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
|
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: samba-log-parser: make python optional
Date: Sun, 26 May 2024 14:40:40 +0300
Forwarded: not-needed
Debian-Specific: yes
samba-log-parser is a rarely used utility written in python.
It is the only python program in the samba-common-bin package.
By using this simple trick (wrapping the script into #!/bin/sh)
we can make the python package optional, to be able to install
minimal samba client.
--- a/source3/script/samba-log-parser
+++ b/source3/script/samba-log-parser
@@ -1,4 +1,9 @@
-#!/usr/bin/env python3
+#! /bin/sh
+""":"
+[ -x /usr/bin/python3 ] && exec /usr/bin/python3 "$0" "$@"
+echo "This program requires python3. Please install python3 package to use it." >&2
+exit 42
+":"""
#
#######################################################################
#
|