summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-04 13:02:23 +0200
committerGitHub <noreply@github.com>2023-08-04 13:02:23 +0200
commit2c1ca985d95f9600a465c7c89a5a82447a354678 (patch)
treef55ff556e1e330cf903f83f5c45bc32848c7f56a
parent8f161eaae78769e5a1d573e43f00a0f439aadc28 (diff)
parent5a987d4a484bf4efac98be0e4d8faad269ad764b (diff)
downloadvyos-1x-2c1ca985d95f9600a465c7c89a5a82447a354678.tar.gz
vyos-1x-2c1ca985d95f9600a465c7c89a5a82447a354678.zip
Merge pull request #2132 from Apachez-/T5436
T5436: Add missing preconfig-script
-rw-r--r--debian/vyos-1x.postinst17
-rw-r--r--src/op_mode/show_techsupport_report.py3
2 files changed, 18 insertions, 2 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index b1bd23ff2..f3dc00b46 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -120,9 +120,24 @@ if ! grep -q '^dhcpd' /etc/passwd; then
adduser --quiet dhcpd hostsd
fi
-# ensure hte proxy user has a proper shell
+# ensure the proxy user has a proper shell
chsh -s /bin/sh proxy
+# create /opt/vyatta/etc/config/scripts/vyos-preconfig-bootup.script
+PRECONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-preconfig-bootup.script
+if [ ! -x $PRECONFIG_SCRIPT ]; then
+ mkdir -p $(dirname $PRECONFIG_SCRIPT)
+ touch $PRECONFIG_SCRIPT
+ chmod 755 $PRECONFIG_SCRIPT
+ cat <<EOF >>$PRECONFIG_SCRIPT
+#!/bin/sh
+# This script is executed at boot time before VyOS configuration is applied.
+# Any modifications required to work around unfixed bugs or use
+# services not available through the VyOS CLI system can be placed here.
+
+EOF
+fi
+
# create /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script
POSTCONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script
if [ ! -x $POSTCONFIG_SCRIPT ]; then
diff --git a/src/op_mode/show_techsupport_report.py b/src/op_mode/show_techsupport_report.py
index d27221e54..53144fd52 100644
--- a/src/op_mode/show_techsupport_report.py
+++ b/src/op_mode/show_techsupport_report.py
@@ -91,7 +91,8 @@ def show_package_repository_config() -> None:
def show_user_startup_scripts() -> None:
"""Prints the user startup scripts."""
- execute_command('cat /config/scripts/vyos-postconfig-bootup.script', 'User Startup Scripts')
+ execute_command('cat /config/scripts/vyos-preconfig-bootup.script', 'User Startup Scripts (Preconfig)')
+ execute_command('cat /config/scripts/vyos-postconfig-bootup.script', 'User Startup Scripts (Postconfig)')
def show_frr_config() -> None: