public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 4/4] chown: Replace . with : on all shipped scripts
Date: Thu, 17 Oct 2024 14:54:16 +0000	[thread overview]
Message-ID: <20241017145416.25394-4-michael.tremer@ipfire.org> (raw)
In-Reply-To: <20241017145416.25394-1-michael.tremer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 8733 bytes --]

I don't like this messy bootup screen that we have with all sorts of
warnings that actually don't cause any problems, but make the boot
messy and send the wrong message to users.

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 lfs/frr                                | 2 +-
 lfs/zabbix_agentd                      | 2 +-
 src/initscripts/helper/aws-setup       | 4 ++--
 src/initscripts/helper/azure-setup     | 4 ++--
 src/initscripts/helper/exoscale-setup  | 4 ++--
 src/initscripts/helper/gcp-setup       | 4 ++--
 src/initscripts/helper/oci-setup       | 4 ++--
 src/initscripts/packages/frr           | 4 ++--
 src/initscripts/packages/zabbix_agentd | 2 +-
 src/initscripts/system/cleanfs         | 2 +-
 src/initscripts/system/squid           | 2 +-
 src/misc-progs/openvpnctrl.c           | 2 +-
 src/misc-progs/sshctrl.c               | 2 +-
 13 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/lfs/frr b/lfs/frr
index 577698cd6..95fbdf0f1 100644
--- a/lfs/frr
+++ b/lfs/frr
@@ -34,7 +34,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = frr
-PAK_VER    = 10
+PAK_VER    = 11
 
 DEPS       =
 
diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd
index dd593ecf1..e33d9db2d 100644
--- a/lfs/zabbix_agentd
+++ b/lfs/zabbix_agentd
@@ -34,7 +34,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = zabbix_agentd
-PAK_VER    = 14
+PAK_VER    = 15
 
 DEPS       = fping
 
diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup
index f14f4eb57..7b3371ac3 100644
--- a/src/initscripts/helper/aws-setup
+++ b/src/initscripts/helper/aws-setup
@@ -110,11 +110,11 @@ import_aws_configuration() {
 		if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
 			mkdir -p "/home/setup/.ssh"
 			chmod 700 "/home/setup/.ssh"
-			chown setup.nobody "/home/setup/.ssh"
+			chown setup:nobody "/home/setup/.ssh"
 
 			echo "${key}" >> "/home/setup/.ssh/authorized_keys"
 			chmod 600 "/home/setup/.ssh/authorized_keys"
-			chown setup.nobody "/home/setup/.ssh/authorized_keys"
+			chown setup:nobody "/home/setup/.ssh/authorized_keys"
 		fi
 	done
 
diff --git a/src/initscripts/helper/azure-setup b/src/initscripts/helper/azure-setup
index 7a4422a35..1a1c2a9fe 100644
--- a/src/initscripts/helper/azure-setup
+++ b/src/initscripts/helper/azure-setup
@@ -132,12 +132,12 @@ import_azure_configuration() {
 			# Install directory
 			mkdir -p "${dir}"
 			chmod 700 "${dir}"
-			chown "${user}.nobody" "${dir}"
+			chown "${user}:nobody" "${dir}"
 
 			# Install the key
 			echo "${key}" >> "${path}"
 			chmod 600 "${path}"
-			chown "${user}.nobody" "${path}"
+			chown "${user}:nobody" "${path}"
 		fi
 	done
 
diff --git a/src/initscripts/helper/exoscale-setup b/src/initscripts/helper/exoscale-setup
index 02fdda2a3..a0475c2bb 100644
--- a/src/initscripts/helper/exoscale-setup
+++ b/src/initscripts/helper/exoscale-setup
@@ -76,11 +76,11 @@ import_exoscale_configuration() {
 	if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
 		mkdir -p "/home/setup/.ssh"
 		chmod 700 "/home/setup/.ssh"
-		chown setup.nobody "/home/setup/.ssh"
+		chown setup:nobody "/home/setup/.ssh"
 
 		echo "${key}" >> "/home/setup/.ssh/authorized_keys"
 		chmod 600 "/home/setup/.ssh/authorized_keys"
-		chown setup.nobody "/home/setup/.ssh/authorized_keys"
+		chown setup:nobody "/home/setup/.ssh/authorized_keys"
 	fi
 
 	# Import any previous settings for the local interfaces
diff --git a/src/initscripts/helper/gcp-setup b/src/initscripts/helper/gcp-setup
index 4f5148c3e..132ee9bb8 100644
--- a/src/initscripts/helper/gcp-setup
+++ b/src/initscripts/helper/gcp-setup
@@ -110,11 +110,11 @@ import_gcp_configuration() {
 		if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
 			mkdir -p "/home/setup/.ssh"
 			chmod 700 "/home/setup/.ssh"
-			chown setup.nobody "/home/setup/.ssh"
+			chown setup:nobody "/home/setup/.ssh"
 
 			echo "${key}" >> "/home/setup/.ssh/authorized_keys"
 			chmod 600 "/home/setup/.ssh/authorized_keys"
-			chown setup.nobody "/home/setup/.ssh/authorized_keys"
+			chown setup:nobody "/home/setup/.ssh/authorized_keys"
 		fi
 	done <<<"$(get instance/attributes/ssh-keys)"
 
diff --git a/src/initscripts/helper/oci-setup b/src/initscripts/helper/oci-setup
index 312014b74..8ea465e50 100644
--- a/src/initscripts/helper/oci-setup
+++ b/src/initscripts/helper/oci-setup
@@ -139,11 +139,11 @@ import_oci_configuration() {
 		if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
 			mkdir -p "/home/setup/.ssh"
 			chmod 700 "/home/setup/.ssh"
-			chown setup.nobody "/home/setup/.ssh"
+			chown setup:nobody "/home/setup/.ssh"
 
 			echo "${key}" >> "/home/setup/.ssh/authorized_keys"
 			chmod 600 "/home/setup/.ssh/authorized_keys"
-			chown setup.nobody "/home/setup/.ssh/authorized_keys"
+			chown setup:nobody "/home/setup/.ssh/authorized_keys"
 		fi
 	done <<<"$(get instance/metadata/ssh_authorized_keys)"
 
diff --git a/src/initscripts/packages/frr b/src/initscripts/packages/frr
index 22cf2f7aa..54cf4d3e7 100644
--- a/src/initscripts/packages/frr
+++ b/src/initscripts/packages/frr
@@ -28,14 +28,14 @@ case "${1}" in
 	start)
 		# Fix permissions of configuration directory
 		if [ -d "/etc/frr" ]; then
-			chown root.frr /etc/frr
+			chown root:frr /etc/frr
 			chmod 775 /etc/frr
 		fi
 
 		for daemon in ${DAEMONS}; do
 			if [ -f "/etc/frr/${daemon}.conf" ]; then
 				# Set permissions
-				chown frr.frr "/etc/frr/${daemon}.conf"
+				chown frr:frr "/etc/frr/${daemon}.conf"
 
 				boot_mesg "Starting FRRouting ${daemon}..."
 				loadproc "/usr/sbin/${daemon}" --daemon
diff --git a/src/initscripts/packages/zabbix_agentd b/src/initscripts/packages/zabbix_agentd
index 055968ef0..224cc4fe4 100644
--- a/src/initscripts/packages/zabbix_agentd
+++ b/src/initscripts/packages/zabbix_agentd
@@ -26,7 +26,7 @@ case "${1}" in
         start)
 		if [ ! -d "/var/run/zabbix" ]; then
 			mkdir -p /var/run/zabbix
-			chown zabbix.zabbix /var/run/zabbix
+			chown zabbix:zabbix /var/run/zabbix
 		fi
 
                 boot_mesg "Starting Zabbix Agent..."
diff --git a/src/initscripts/system/cleanfs b/src/initscripts/system/cleanfs
index d1cbb2547..af9332c49 100644
--- a/src/initscripts/system/cleanfs
+++ b/src/initscripts/system/cleanfs
@@ -92,7 +92,7 @@ case "${1}" in
 		fi
 		if [ ! -e /var/lock/time ]; then
 			mkdir -p /var/lock/time
-			chown nobody.root /var/lock/time
+			chown nobody:root /var/lock/time
 		fi
 		if [ ! -e /var/run/clamav ]; then
 			mkdir -p /var/run/clamav
diff --git a/src/initscripts/system/squid b/src/initscripts/system/squid
index b7cb30b7c..d45734334 100644
--- a/src/initscripts/system/squid
+++ b/src/initscripts/system/squid
@@ -185,7 +185,7 @@ case "$1" in
 		;;
 
 	setperms)
-		chown -R nobody.squid /var/updatecache/
+		chown -R nobody:squid /var/updatecache/
 		;;
 
 	*)
diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c
index 8de6eec5c..fb32146e4 100644
--- a/src/misc-progs/openvpnctrl.c
+++ b/src/misc-progs/openvpnctrl.c
@@ -504,7 +504,7 @@ void startDaemon(void) {
 		executeCommand(command);
 		snprintf(command, STRING_SIZE-1, "/usr/sbin/openvpn --config /var/ipfire/ovpn/server.conf");
 		executeCommand(command);
-		snprintf(command, STRING_SIZE-1, "/bin/chown root.nobody /var/run/ovpnserver.log");
+		snprintf(command, STRING_SIZE-1, "/bin/chown root:nobody /var/run/ovpnserver.log");
 		executeCommand(command);
 		snprintf(command, STRING_SIZE-1, "/bin/chmod 644 /var/run/ovpnserver.log");
 		executeCommand(command);
diff --git a/src/misc-progs/sshctrl.c b/src/misc-progs/sshctrl.c
index f1d0338c2..31f59b140 100644
--- a/src/misc-progs/sshctrl.c
+++ b/src/misc-progs/sshctrl.c
@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
 				sleep(5);
 				unlink("/var/ipfire/remote/enablessh");
 				safe_system("cat /var/ipfire/remote/settings | sed 's/ENABLE_SSH=on/ENABLE_SSH=off/' > /var/ipfire/remote/settings2 && mv /var/ipfire/remote/settings2 /var/ipfire/remote/settings");
-        safe_system("chown nobody.nobody /var/ipfire/remote/settings");
+				safe_system("chown nobody:nobody /var/ipfire/remote/settings");
 				snprintf(command, BUFFER_SIZE-1, "sleep %s && /usr/local/bin/sshctrl &", argv[2]);
 				safe_system(command);
 	}
-- 
2.39.5


      parent reply	other threads:[~2024-10-17 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 14:54 [PATCH 1/4] hostapd: Enable logging to syslog Michael Tremer
2024-10-17 14:54 ` [PATCH 2/4] wlanap.cgi: Use the correct array to fetch the current interface Michael Tremer
2024-10-17 14:54 ` [PATCH 3/4] udev: network-hotplug-bridges: Silence a warning when interfaces have gone away Michael Tremer
2024-10-17 14:54 ` Michael Tremer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241017145416.25394-4-michael.tremer@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox