source: trunk/debian/rootfs/files/all/usr/sbin/PostInstall @ 868

Last change on this file since 868 was 868, checked in by amain, 3 years ago

rootfs: auto install all debwrt packages

  • Property svn:executable set to *
File size: 1.5 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 [ -f /etc/init.d/rcS ] ; then
28  # the symbolic link to /etc/init.d/rcS.firstboot is gone
29  if ! diff -q /etc/init.d/rcS /etc/init.d/rcS.debian; then
30    # they are equal
31    rm /etc/init.d/rcS.debian
32  fi
33fi
34
35if [ $(find /lib/modules/ -maxdepth 1 -mindepth 1 -type d | wc -l) -lt 1 ]
36then
37  cat << HERE
38
39W: No kernel modules directory found in /lib/modules.
40   See /lib/modules/debwrt.README for more information.
41
42HERE
43fi
44
45if [ -x /usr/sbin/in.telnetd ] ; then
46  echo "W: telnet daemon programm found, consider uninstalling it."
47  echo
48fi
49
50# note: This program did NOT check NOR setup network switch configuration
51
52echo -n "I: syncing disks...."
53sync
54echo "done"
55echo
56
57cat <<EOF
58I: Next step is configuring the network and run apt-get update. Have fun!!
59
60EOF
Note: See TracBrowser for help on using the repository browser.