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

Last change on this file since 301 was 301, checked in by amain, 8 years ago

rootfs: fix post install to install debwrt cross compiled packages

  • Property svn:executable set to *
File size: 1.6 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
10if [ -x /debootstrap/debootstrap ] ; then
11  echo "I: Running second stage of debootstap (may take some time)"
12  /debootstrap/debootstrap --second-stage
13
14  echo "I: Cleaning up /var/cache/apt/archives"
15  rm -rf /var/cache/apt/archives
16  mkdir -p /var/cache/apt/archives/partial
17else
18  echo "W: No debootstrap executable found, assuming 'second stage debootstrap' is allready done"
19fi
20
21if [ ! -s /etc/apt/sources.list ]; then
22   debian_release=$( cat /etc/debian_release )
23   echo "I: setting up /etc/apt/sources.list for ${debian_release}"
24   cat >/etc/apt/sources.list <<EOF
25deb http://ftp.debian.org/debian ${debian_release} main
26EOF
27fi
28
29if [ -f /etc/init.d/rcS ] ; then
30  # the symbolic link to /etc/init.d/rcS.firstboot is gone
31  if ! diff -q /etc/init.d/rcS /etc/init.d/rcS.debian; then
32    # they are equal
33    rm /etc/init.d/rcS.debian
34  fi
35fi
36
37if [ -d /lib/modules/$( uname -r ) ] ; then
38  : # most likely are the kernel modules available in the root file system
39else
40  cat << HERE
41
42W: Kernel modules top directory /lib/modules/$( uname -r ) NOT found!
43   See /lib/modules/debwrt.README for more information.
44
45HERE
46fi
47
48if [ -x /usr/sbin/in.telnetd ] ; then
49  echo "W: telnet daemon programm found, consider uninstalling it."
50  echo
51fi
52
53# note: This program did NOT check NOR setup network switch configuration
54
55echo -n "I: syncing disks...."
56sync
57echo "done"
58echo
59
60cat <<EOF
61
62I: Next step is configuring the network and run apt-get update. Have fun!!
63
64EOF
Note: See TracBrowser for help on using the repository browser.