source: trunk/debian/rootfs/files/usr/sbin/PostInstall @ 517

Last change on this file since 517 was 517, checked in by amain, 6 years ago

Merge contrib branch 340:516. Main features added:

  • updated plugin architecture
  • improved patch system
  • bitten continous integration support
  • sever build fixed over time to remain in sync with OpenWrt
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3# DebWrt PostInstall
4#
5# Copyright (C) 2011 Geert Stappers  <stappers@stappers.nl>
6# Copyright (C) 2011 Johan van Zoomeren <amain@debwrt.net>
7#
8# Licenced GNU General Public License v2
9
10# hack for Debian sid
11[ -e /var/run/sshd ] && mv /var/run/sshd /tmp
12
13if [ -x /debootstrap/debootstrap ] ; then
14  echo "I: Running second stage of debootstap (may take some time)"
15  /debootstrap/debootstrap --second-stage
16
17  echo "I: Cleaning up /var/cache/apt/archives"
18  rm -rf /var/cache/apt/archives
19  mkdir -p /var/cache/apt/archives/partial
20else
21  echo "W: No debootstrap executable found, assuming 'second stage debootstrap' is allready done"
22fi
23
24# hack for Debian sid
25[ -e /tmp/sshd -a ! -e /var/run/sshd ] && mv /tmp/sshd /var/run
26
27if [ ! -s /etc/apt/sources.list ]; then
28   debian_release=$( cat /etc/debian_release )
29   echo "I: setting up /etc/apt/sources.list for ${debian_release}"
30   cat >/etc/apt/sources.list <<EOF
31deb http://ftp.debian.org/debian ${debian_release} main
32EOF
33fi
34
35if [ -f /etc/init.d/rcS ] ; then
36  # the symbolic link to /etc/init.d/rcS.firstboot is gone
37  if ! diff -q /etc/init.d/rcS /etc/init.d/rcS.debian; then
38    # they are equal
39    rm /etc/init.d/rcS.debian
40  fi
41fi
42
43if [ $(find /lib/modules/ -maxdepth 1 -mindepth 1 -type d | wc -l) -lt 1 ]
44then
45  cat << HERE
46
47W: No kernel modules directory found in /lib/modules.
48   See /lib/modules/debwrt.README for more information.
49
50HERE
51fi
52
53if [ -x /usr/sbin/in.telnetd ] ; then
54  echo "W: telnet daemon programm found, consider uninstalling it."
55  echo
56fi
57
58# note: This program did NOT check NOR setup network switch configuration
59
60echo -n "I: syncing disks...."
61sync
62echo "done"
63echo
64
65cat <<EOF
66I: Next step is configuring the network and run apt-get update. Have fun!!
67
68EOF
Note: See TracBrowser for help on using the repository browser.