summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-17 20:20:51 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-17 20:20:51 +0100
commitefb35b3db85848b58e884f2e0f1303c3f8d0ec4d (patch)
tree4f1304da7d116c70a722562d9d52fb95ffc14259 /scripts
parentb19ad8df78df6b5246c8df557e069e19dbf2bbca (diff)
downloadvyatta-cfg-system-efb35b3db85848b58e884f2e0f1303c3f8d0ec4d.tar.gz
vyatta-cfg-system-efb35b3db85848b58e884f2e0f1303c3f8d0ec4d.zip
T671: drop rl-system.init, moved to vyos-router init script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rl-system.init134
1 files changed, 0 insertions, 134 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
deleted file mode 100755
index c3abf451..00000000
--- a/scripts/rl-system.init
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/bin/bash
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# This code was originally developed by Vyatta, Inc.
-# Copyright (C) 2007-2010 Vyatta, Inc.
-# All Rights Reserved.
-#
-# Description: Vyatta Router system setup
-# Indirect init sub-script of vyatta-router.init
-#
-# **** End License ****
-
-progname=${0##*/}
-ACTION=$1
-
-source /etc/default/vyatta
-
-: ${vyatta_prefix:=/opt/vyatta}
-: ${vyatta_bindir:=${vyatta_prefix}/bin}
-: ${vyatta_sbindir:=${vyatta_prefix}/sbin}
-: ${vyatta_sysconfdir:=${vyatta_prefix}/etc}
-
-[[ $PATH == *${vyatta_bindir}* ]] || PATH+=:${vyatta_bindir}
-[[ $PATH == *${vyatta_sbindir}* ]] || PATH+=:${vyatta_sbindir}
-
-export PATH
-export DEBIAN_FRONTEND=noninteractive
-
-. /lib/lsb/init-functions
-
-## BOOTFILE is provided by ofr.init
-: ${BOOTFILE:=$prefix/etc/config/config.boot}
-
-syslog ()
-{
- logger -p user.warning -t "$progname" "$*"
-}
-
-# easy way to make empty file without any command
-empty()
-{
- >$1
-}
-
-shopt -s extglob nullglob
-
-clear_or_override_config_files ()
-{
- for conf in snmp/snmpd.conf snmp/snmptrapd.conf snmp/snmp.conf \
- keepalived/keepalived.conf cron.d/vyos-crontab \
- ipvsadm.rules default/ipvsadm resolv.conf
- do
- if [ -s /etc/$conf ] ; then
- empty /etc/$conf
- chmod 0644 /etc/$conf
- fi
- done
-}
-
-update_interface_config () {
- if [ -d /run/udev/vyatta ]; then
- $vyatta_sbindir/vyatta_interface_rescan /run/udev/vyatta $BOOTFILE
- fi
-}
-
-# These are all the default security setting which are later
-# overridden when configuration is read. These are the values the
-# system defaults.
-security_reset () {
- # restore PAM back to virgin state (no radius other services)
- rm -f /etc/pam_radius_auth.conf
- if grep -q radius /etc/pam.d/common-auth; then
- pam-auth-update --package --remove radius
- fi
-
- # The PPPOE config files are re-generated by the configuration subsystem
- # on every boot, so we delete the old ones here.
- rm -f /etc/ppp/peers/pppoe*
-}
-
-start () {
- mkdir -p /var/run/vyatta /var/log/vyatta
- chgrp vyattacfg /var/run/vyatta /var/log/vyatta
- chmod 775 /var/run/vyatta /var/log/vyatta
-
- # mountpoint for bpf maps required by xdp
- mount -t bpf none /sys/fs/bpf
-
- update_interface_config
- clear_or_override_config_files || \
- log_failure_msg "can\'t reset config files"
-
- security_reset
-
- # Remove links from the post-commit hooks directory.
- # note that this approach only supports hooks that are "configured",
- # i.e., it does not support hooks that need to always be present.
- cpostdir=$(cli-shell-api getPostCommitHookDir)
-
- # exclude commits hooks from vyatta-cfg
- excluded="10vyatta-log-commit.pl 99vyos-user-postcommit-hooks"
-
- if [ -d "$cpostdir" ]; then
- for f in $cpostdir/*
- do
- if [[ ! $excluded =~ $(basename $f) ]]; then
- rm -f $cpostdir/$(basename $f)
- fi
- done
- fi
-
- ## Clear out apt config file--it will be filled in by config load
- empty /etc/apt/sources.list
-
- # remove any interface stat clears
- rm -f /var/run/vyatta/*.stats
-}
-
-case "$ACTION" in
- start) start ;;
- stop|restart|force-reload) true ;; # nothing to stop/restart
- *) log_failure_msg "action unknown: $ACTION" ;
- false ;;
-esac
-
-exit $?