summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rw-r--r--debian/control2
-rw-r--r--debian/vyatta-cfg-system.postinst.in36
-rw-r--r--sysconf/hosts1
-rw-r--r--sysconf/logrotate_messages9
-rw-r--r--sysconf/motd.tail4
-rw-r--r--sysconf/syslog.conf1
7 files changed, 57 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 5d3ebe15..fb2f9905 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
bin_SCRIPTS =
sbin_SCRIPTS =
+sysconf_DATA =
bin_SCRIPTS += scripts/progress-indicator
bin_SCRIPTS += scripts/vyatta-functions
@@ -8,3 +9,8 @@ sbin_SCRIPTS += scripts/install-system
sbin_SCRIPTS += scripts/quick-install
sbin_SCRIPTS += scripts/standalone_root_pw_reset
+sysconf_DATA += sysconf/hosts
+sysconf_DATA += sysconf/logrotate_messages
+sysconf_DATA += sysconf/motd.tail
+sysconf_DATA += sysconf/syslog.conf
+
diff --git a/debian/control b/debian/control
index d0095055..2d092ba5 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Depends: bash (>= 3.1),
perl (>= 5.8.8),
procps (>= 1:3.2.7-3),
coreutils (>= 5.97-5.3),
- vyatta-cfg, sysv-rc, ifrename, ntp, sysklogd
+ vyatta-cfg, sysv-rc, ifrename, ntp, sysklogd, busybox, ssh
Suggests: util-linux (>= 2.13-5),
net-tools,
ethtool,
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 39c4e4d1..3d02ded9 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -1,8 +1,42 @@
#!/bin/bash
prefix=@prefix@
+exec_prefix=@exec_prefix@
sysconfdir=@sysconfdir@
+bindir=@bindir@
+sbindir=@sbindir@
-# remove init of daemons that we manage
+# remove init of daemons that we start/stop
update-rc.d -f ntp remove >/dev/null
+# create symlinks
+for bb in telnetd telnet tftp ftpget ftpput; do
+ ln -sf /bin/busybox ${sbindir}/${bb}
+done
+ln -sf ${bindir}/progress-indicator /usr/bin/progress-indicator
+
+# remove the config files
+for conf in hosts motd.tail ntp.conf syslog.conf logrotate.d/messages; do
+ [ -f /etc/$conf ] && \
+ ( mv /etc/$conf /etc/$conf.vyatta-save && touch /etc/$conf );
+done
+
+# use our config files
+if [ "$sysconfdir" != "/etc" ]; then
+ for conf in hosts motd.tail syslog.conf; do
+ cp $sysconfdir/$conf /etc/$conf
+ done
+ cp $sysconfdir/logrotate_messages /etc/logrotate.d/messages
+fi
+
+# update crontab for logrotate
+grep -v logrotate /etc/crontab>/etc/crontab.$$
+echo "*/10 * * * * /usr/sbin/logrotate /etc/logrotate.conf" >> /etc/crontab.$$
+rm /etc/crontab
+mv /etc/crontab.$$ /etc/crontab
+crontab /etc/crontab
+
+# create needed directories
+mkdir -p /etc/raddb
+mkdir -p /var/log/{user,vrrpd}
+
diff --git a/sysconf/hosts b/sysconf/hosts
new file mode 100644
index 00000000..ba712fe0
--- /dev/null
+++ b/sysconf/hosts
@@ -0,0 +1 @@
+127.0.0.1 localhost
diff --git a/sysconf/logrotate_messages b/sysconf/logrotate_messages
new file mode 100644
index 00000000..c2f662ff
--- /dev/null
+++ b/sysconf/logrotate_messages
@@ -0,0 +1,9 @@
+/var/log/messages {
+ missingok
+ notifempty
+ rotate 10
+ size=1000k
+ postrotate
+ kill -HUP `cat /var/run/syslogd.pid`
+ endscript
+}
diff --git a/sysconf/motd.tail b/sysconf/motd.tail
new file mode 100644
index 00000000..0ae9e837
--- /dev/null
+++ b/sysconf/motd.tail
@@ -0,0 +1,4 @@
+Welcome to Vyatta.
+This system is open-source software. The exact distribution terms for
+each module comprising the full system are described in the individual
+files in /usr/share/doc/*/copyright.
diff --git a/sysconf/syslog.conf b/sysconf/syslog.conf
new file mode 100644
index 00000000..5f7bff4f
--- /dev/null
+++ b/sysconf/syslog.conf
@@ -0,0 +1 @@
+*.warning /var/log/messages