From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 25 Oct 2024 13:20:25 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t4IMi-000bXG-0Y for lore@lore.pengutronix.de; Fri, 25 Oct 2024 13:20:25 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1t4IMj-0006ZH-1V; Fri, 25 Oct 2024 13:20:25 +0200 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t4IMd-0006Z8-9x for ptxdist@pengutronix.de; Fri, 25 Oct 2024 13:20:20 +0200 ARC-Seal: i=1; a=rsa-sha256; t=1729855218; cv=none; d=strato.com; s=strato-dkim-0002; b=U2qt5sdXnyuH/MyURWlmWbetO8E2A9OUk3Q5dYJ+JtOMI0J8d3sD2+0qVRzRrpo6Ln qpgkEvuPuURJFZqCg2oeZ8Ih6o9Ygxtk/MUJmiAbsEP+fF/mjZBTa8rmbmHm8Ol/iW8q BhFOJYlcKw/50wyIhvLMCXsIJwbQFD3OiCPHBFxVdN5IunNY17hXOKzwkAiK+Ml2erPM 9ClT83bxOHnJm0jhfGjhybIKq8uDaR4kNR3V0/aDlUztdveEg2s999dmWJs8fpAzztbM 3PM0hsUlLtl03tGfHxtki9XQSgYGPuSNuB4sR+01BQVlK7kHuE/V33/uZ+r0EVK4QdvP Wmlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1729855218; s=strato-dkim-0002; d=strato.com; h=Subject:Message-ID:To:Date:References:In-Reply-To:From:Cc:Date:From: Subject:Sender; bh=58dHjeQY6ZPc9FLWFGL9L7olAGN7p1x31VnvYid8bP4=; b=sKH8X/RU8Yd/qYRIQbPjh5l0dUJkPZ9A0+WGN3uG1a6M3RJhzWMxJdOEihLysrrtwf nxXrgsL9ssSfeBuTo1xPNhw6SkKebdGpe+VuATMwl5pxMKLNhSVpxYKvtQXc/9NvV2+8 KbpFspmXnnPbQa8o6n5BkapiZE+qmW+ZrtVkeXxVeuDfLHUcnAINCD+U4J97n6lRHf5M 0AsqalEZ0vc+xGxusg7W4g2nkMlYUUdjh3h7XlX4L82RtQF/R6KlVGYshxLTsoKrdu2i 2eE7PYMDfGm5Taok81kLr5H/cmeX8RxyBPRC1l0Qp62E7z6oj/PY0ARoarJa+E0wFVid AqJQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1729855218; s=strato-dkim-0002; d=4wiebe.de; h=Subject:Message-ID:To:Date:References:In-Reply-To:From:Cc:Date:From: Subject:Sender; bh=58dHjeQY6ZPc9FLWFGL9L7olAGN7p1x31VnvYid8bP4=; b=nfCtwKK06dvEHA5/QRx6/s5RB+V5vNZ1kcaxbo30tBPrAtlEv9ad9A1MfsG0Bo3Fqo tdnIEohwOnnaaGwHB/R3PVZZIaphdeKtZfiXJPEON7wn2V59D+luHUGcnrGTWke1UNzz vJVwYR/buygqI3M1D8LlF+fjW6fPeqQPrLQeQFlDoLAekSG/kXJ7aT6uAc6v9LGrEE3o 3OKgNg5j6LPwEVryD/d5pXFRVAdphm0EEtaUpQA/xTbG1lspnJfRkAqD+Bddab8auPeZ W5yWowUZA0h7WnPbIJ+bNNnb4vdGIRMW+hx5sSvVN/avf2+/8kKxpRPh21EaDsSHAwI8 drYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1729855218; s=strato-dkim-0003; d=4wiebe.de; h=Subject:Message-ID:To:Date:References:In-Reply-To:From:Cc:Date:From: Subject:Sender; bh=58dHjeQY6ZPc9FLWFGL9L7olAGN7p1x31VnvYid8bP4=; b=X0Mxi+jB3c0sdKX84q4uCREVBe1jl+kLPvXsTOVk8UsvUPCFQPFKRfjByQUfzqudfY zW/KrDU9xNCBzSNWHlAA== X-RZG-AUTH: ":Km0JfEyhft8wzIIhFLJpRLyPODuSc5X4exbVQe+uavLthqzsfqAYbr4lR6MnJJDf" Received: from home by smtp.strato.de (RZmta 51.2.11 DYNA|AUTH) with ESMTPSA id 4a068809PBKIayK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Fri, 25 Oct 2024 13:20:18 +0200 (CEST) Received: from cloud.local (cloud.local [127.0.0.1]) by home (Postfix) with ESMTP id BFB341A02A3 for ; Fri, 25 Oct 2024 13:20:17 +0200 (CEST) From: "Artur Wiebe" In-Reply-To: <20241025073255.2195902-1-m.olbrich@pengutronix.de> Content-Type: text/plain; charset="utf-8" X-Forward: ::1 References: <20241008132331.1372881-1-g.schenk@eckelmann.de> <20241025073255.2195902-1-m.olbrich@pengutronix.de> Date: Fri, 25 Oct 2024 13:20:17 +0200 To: ptxdist@pengutronix.de MIME-Version: 1.0 Message-ID: <346-671b7f00-51-13e69d40@37838701> User-Agent: SOGoMail 5.10.0 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] =?utf-8?q?=5BAPPLIED=5D_hostapd=3A_Add_systemd_service?= =?utf-8?q?_unit?= X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi Michael, here /etc/hostapd/hostapd.conf would be installed twice! BR, Artur On Friday, 25 October, 2024 09:32 CEST, Michael Olbrich wrote: > Thanks, applied as 49049c01b0a932c74c77b64f1b42c85141fec8e4. >=20 > Michael >=20 > [sent from post-receive hook] >=20 > On Fri, 25 Oct 2024 09:32:55 +0200, Gavin Schenk wrote: > > If selected, start hostapd as a systemd service in multi-user.targe= t > > using a configuration file at the specified file path. > >=20 > > Signed-off-by: Gavin Schenk > > Message-Id: <20241008132331.1372881-1-g.schenk@eckelmann.de> > > Signed-off-by: Michael Olbrich > >=20 > > diff --git a/projectroot/etc/hostapd/hostapd.conf b/projectroot/etc= /hostapd/hostapd.conf > > new file mode 100644 > > index 000000000000..9e425a8c3d71 > > --- /dev/null > > +++ b/projectroot/etc/hostapd/hostapd.conf > > @@ -0,0 +1,2 @@ > > +# This is a placeholder. You have to provide a real configuration= here. See > > +# hostapd.conf in package hostapd as a starting point for you own = configuration. > > diff --git a/projectroot/usr/lib/systemd/system/hostapd.service b/p= rojectroot/usr/lib/systemd/system/hostapd.service > > new file mode 100644 > > index 000000000000..bef52896c28e > > --- /dev/null > > +++ b/projectroot/usr/lib/systemd/system/hostapd.service > > @@ -0,0 +1,15 @@ > > +[Unit] > > +Description=3DAccess point and authentication server for Wi-Fi and= Ethernet > > +After=3Dnetwork.target > > +ConditionFileNotEmpty=3D/etc/hostapd/hostapd.conf > > + > > +[Service] > > +Type=3Dforking > > +PIDFile=3D/run/hostapd.pid > > +Restart=3Don-failure > > +RestartSec=3D2 > > +Environment=3DDAEMON=5FCONF=3D/etc/hostapd/hostapd.conf > > +ExecStart=3D/usr/sbin/hostapd -B -P /run/hostapd.pid ${DAEMON=5FCO= NF} > > + > > +[Install] > > +WantedBy=3Dmulti-user.target > > diff --git a/rules/hostapd.in b/rules/hostapd.in > > index 6ac6be52cd6f..9c95fe37387e 100644 > > --- a/rules/hostapd.in > > +++ b/rules/hostapd.in > > @@ -1,10 +1,10 @@ > > ## SECTION=3Dnetworking > > =20 > > -config HOSTAPD > > +menuconfig HOSTAPD > > tristate > > select OPENSSL > > select LIBNL3 > > - prompt "hostapd" > > + prompt "hostapd " > > help > > IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator > > =20 > > @@ -21,3 +21,14 @@ config HOSTAPD > > authentication without requiring an external RADIUS > > authentication server), and RADIUS authentication server for > > EAP authentication. > > + > > +if HOSTAPD > > + > > +config HOSTAPD=5FSYSTEMD=5FUNIT > > + bool > > + prompt "Enable systemd support" > > + depends on INITMETHOD=5FSYSTEMD > > + help > > + Install systemd units to start this service on startup. > > + > > +endif > > diff --git a/rules/hostapd.make b/rules/hostapd.make > > index 2d061b5d4412..11b5ca1b0e08 100644 > > --- a/rules/hostapd.make > > +++ b/rules/hostapd.make > > @@ -74,6 +74,15 @@ $(STATEDIR)/hostapd.targetinstall: > > @$(call install=5Fcopy, hostapd, 0, 0, 0755, -, /usr/sbin/hostapd= ) > > @$(call install=5Falternative, hostapd, 0, 0, 0644, /etc/hostapd/= hostapd.conf) > > =20 > > +ifdef PTXCONF=5FHOSTAPD=5FSYSTEMD=5FUNIT > > + @$(call install=5Falternative, hostapd, 0, 0, 0644, \ > > + /usr/lib/systemd/system/hostapd.service) > > + @$(call install=5Flink, hostapd, ../hostapd.service, \ > > + /lib/systemd/system/multi-user.target.wants/hostapd.service) > > + @$(call install=5Falternative, hostapd, 0, 0, 0644, \ > > + /etc/hostapd/hostapd.conf) /etc/hostapd/hostapd.conf is already installed above! > > +endif > > + > > @$(call install=5Ffinish, hostapd) > > =20 > > @$(call touch) >