Difference between revisions of "Talk:EBox on FreeLink-Debian"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
 
(One intermediate revision by one user not shown)
Line 166: Line 166:
 
   sleep 3
 
   sleep 3
 
   cd /
 
   cd /
   wget http://downloads.linkstationwiki.net/uploads/ebox/libnet-arp-perl_0.8-1_powerpc.deb
+
   wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libnet-arp-perl_0.8-1_powerpc.deb
   wget http://downloads.linkstationwiki.net/uploads/ebox/libnet-cups-perl_0.37-1_powerpc.deb
+
   wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libnet-cups-perl_0.37-1_powerpc.deb
   wget http://downloads.linkstationwiki.net/uploads/ebox/libreadonly-xs-perl_1.04-1_powerpc.deb
+
   wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libreadonly-xs-perl_1.04-1_powerpc.deb
 
   dpkg -i libreadonly-xs-perl_1.04-1_powerpc.deb
 
   dpkg -i libreadonly-xs-perl_1.04-1_powerpc.deb
 
   dpkg -i libnet-arp-perl_0.8-1_powerpc.deb
 
   dpkg -i libnet-arp-perl_0.8-1_powerpc.deb
Line 197: Line 197:
 
   echo "* Please leave feedback and/or report any bugs or problems on the      * "
 
   echo "* Please leave feedback and/or report any bugs or problems on the      * "
 
   echo "* eBox on PPC forum thread at...             * "
 
   echo "* eBox on PPC forum thread at...             * "
   echo "* http://forum.linkstationwiki.net/index.php?action=vthread&topic=2397 * "
+
   echo "* http://forum.nas-central.org/viewtopic.php?f=9&t=2397               * "
 
   sleep 3
 
   sleep 3
 
   
 
   
 
   
 
   
 
  ###### end of script ########
 
  ###### end of script ########

Latest revision as of 07:36, 11 September 2007

#! /bin/bash
 echo " "
 echo -n "What do you want the name of your linkstation to be on the network? (Default will be LinkStation)" 
 read -e LINKSTATION
 if [ "$LINKSTATION" == "" ] ; then
    LINKSTATION="LinkStation"
 fi 
 hostname $LINKSTATION
 rm /tmp/file
 echo "127.0.0.1 $LINKSTATION" >> /tmp/file
 grep -v 127.0.0.1  /etc/hosts >> /tmp/file
 cat /tmp/file > /etc/hosts
 export hosts
 echo "$LINKSTATION" > /etc/hostname 
 echo -n "Do you wish to enter a satic IP address? (y/n)"
 read -e ANSWER
 if [ "$ANSWER" == "n" ] ; then
  exit 1
 fi
###############################
# STATIC IP - GET IT RIGHT    #
###############################
 
 mv /etc/network/interfaces /etc/network/interfaces.bak
 echo -n "What do you want your static IP to be? (Default will be 192.168.0.101)"
 read -e STATICIP
 if [ "$STATICIP" == "" ] ; then
    STATICIP="192.168.0.101"
 fi
 echo -n "What do you want your 'network' to be? (Default will be 192.168.0.0)"
 read -e STATICNETWORK
 if [ "$STATICNETWORK" == "" ] ; then
    STATICNETWORK="192.168.0.0"
 fi
 echo -n "What do you want your 'netmask' to be? (Default will be 255.255.255.0)"
 read -e STATICNETMASK
 if [ "$STATICNETMASK" == "" ] ; then
    STATICNETMASK="255.255.255.0"
 fi
 echo -n "What do you want your 'broadcast' to be? (Default will be 192.168.0.255)"
 read -e STATICBROAD
 if [ "$STATICBROAD" == "" ] ; then
    STATICBROAD="255.255.255.0"
 fi
 echo -n "What do you want your 'gateway' to be? (Default will be 192.168.0.1)"
 read -e STATICGATE
 if [ "$STATICGATE" == "" ] ; then
    STATICGATE="192.168.0.1"
 fi
 echo -n "What is your SSID? (Default will be blank)"
 read -e SSID
 if [ "$SSID" == "" ] ; then
    SSID=""
 fi
 echo -n "What do you want nameserver to be? (Default will be 192.168.0.1)"
 read -e NAMESERV
 if [ "$NAMESERV" == "" ] ; then
    NAMESERV="192.168.0.1"
 fi
 echo "# we always want the loopback interface" >> /etc/network/interfaces
 echo "#" >> /etc/network/interfaces
 echo "auto lo" >> /etc/network/interfaces
 echo "iface lo inet loopback" >> /etc/network/interfaces
 echo "" >> /etc/network/interfaces
 echo "# default dynamic setup (no adjustment necessary)" >> /etc/network/interfaces
 echo "#" >> /etc/network/interfaces
 echo "#auto eth0" >> /etc/network/interfaces
 echo "#iface eth0 inet dhcp" >> /etc/network/interfaces
 echo "#      hostname `hostname`" >> /etc/network/interfaces
 echo "" >> /etc/network/interfaces
 echo "# frontalot's static setup (adjust to your network settings)" >> /etc/network/interfaces
 echo "#" >> /etc/network/interfaces
 echo "auto eth0" >> /etc/network/interfaces
 echo "iface eth0 inet static" >> /etc/network/interfaces
 echo "    address $STATICIP" >> /etc/network/interfaces
 echo "    network $STATICNETWORK" >> /etc/network/interfaces
 echo "    netmask $STATICNETMASK" >> /etc/network/interfaces
 echo "    broadcast $STATICBROAD" >> /etc/network/interfaces
 echo "    gateway $STATICGATE" >> /etc/network/interfaces
 echo "    search $SSID" >> /etc/resolv.conf
 echo "    nameserver $NAMESERV" >> /etc/resolv.conf

 echo  "* * * * * restarting networking * * * * *"
 sleep 3

 /etc/init.d/networking restart
 sleep 3 

 echo  "* * * * restarted networking  * * * *"

####################
#SETUP /etc/hosts  #
####################

 cp  /etc/hosts  /etc/pre-ebox-hosts-backup

 echo  "127.0.0.1     localhost.localdomain  localhost"    >  /etc/hosts
 echo  "$STATICIP     $LINKSTATION.dnmwireless.com     $LINKSTATION"   >>  /etc/hosts

##############################################################
#######	check to see if you are connected to the internet ####
####### and that DNS works for you			  ####
##############################################################  
 
 ping -q -c 10 yahoo.com

##############################################################
#######  remove old dhcpd and put in newer one ###############
##############################################################

 #dpkg --purge dhcpcd 
 #apt-get -y  install dhcp3-client

##############################################################
######## set up an eBox-platform compatible apt source.list ##
#######	but keep a copy of your old list		 #####
##############################################################

 mv /etc/apt/sources.list  /etc/apt/pre-ebox-sources.backup-list


 echo deb http://mirrors.kernel.org/debian/ stable main >> /etc/apt/sources.list
 echo deb-src http://mirrors.kernel.org/debian/ stable main >> /etc/apt/sources.list
 echo "#######################################################" >> /etc/apt/sources.list
 echo "##deb http://security.debian.org/ stable/updates main" >> /etc/apt/sources.list
 echo "#######################################################" >> /etc/apt/sources.list
 echo deb http://ebox-platform.com/debian/stable/ ebox/ >> /etc/apt/sources.list
 echo deb http://ebox-platform.com/debian/stable/ extra/ >> /etc/apt/sources.list
 echo deb http://ebox-platform.com/debian/sarge/stable/ security/ >> /etc/apt/sources.list
 echo "#######################################################" >> /etc/apt/sources.list
 echo "##   testing branch  ####" >> /etc/apt/sources.list
 echo "##   de-comment these lines to --temporarily enable the testing branch" >> /etc/apt/sources.list
 echo "#deb http://http.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list
 echo "#deb-src http://http.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list

##############################################################################
######  update your Debian installation & install necessary packages     #####
##############################################################################

 apt-get update
 apt-get upgrade
 apt-get install module-init-tools libperl5.8 perl perl-base perl-modules libterm-readline-gnu-perl libterm- readline-perl-perl  libcupsys2-gnutls10  perl-doc ssh xfsprogs

##################################################
######  update your timezone configuration   #####
##################################################

 echo -n "Do you wish to update your timezone? (y/n)"
 read -e ANSWER
 if [ "$ANSWER" == "y" ] ; then
  tzconfig
 fi

#############################################################
######	remove exim4 as it is not compatible with eBox 	#####
#############################################################

 apt-get remove exim4
 apt-get update

##############################################################
######  install essential libs for eBox, built for PPC  ######
##############################################################

 echo "* * * * * * * Installing libs for ebox * * * * * * *"
 sleep 3
 cd /
 wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libnet-arp-perl_0.8-1_powerpc.deb
 wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libnet-cups-perl_0.37-1_powerpc.deb
 wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/libreadonly-xs-perl_1.04-1_powerpc.deb
 dpkg -i libreadonly-xs-perl_1.04-1_powerpc.deb
 dpkg -i libnet-arp-perl_0.8-1_powerpc.deb
 dpkg -i libnet-cups-perl_0.37-1_powerpc.deb
 echo "* * * * * * * libs for ebox installed * * * * * * * "
 sleep 3

########################################
######  install ebox and modules  ######
########################################

 echo "* * * * * ** getting ebox & modules * * * * * * * * *"
 sleep 3
 apt-get install ebox libebox ebox-network ebox-objects ebox-firewall ebox-samba ebox-squid ebox-usersandgroups ebox-ntp ebox-printers ebox-dhcp

### apt-get install missing software packages 
 

####  make a sym link from /home/samba  to  /mnt###
#### optional  #####

 echo "* * * * * * * * * * All done installing eBox * * * * * * * * * * * * * * " 
 echo "* Point your browser to         https://<eBoxLinkStation's IP>         * "
 echo "* and configure your eBoxLinkStation to your liking...                 * "
 echo "* Remember to open up SSH access so that you can connect to do any     * "
 echo "* changes or installation that can't be handled through the web        * "
 echo "* interface.							     * "
 echo "* Please leave feedback and/or report any bugs or problems on the      * "
 echo "* eBox on PPC forum thread at...				             * "
 echo "* http://forum.nas-central.org/viewtopic.php?f=9&t=2397                * "
 sleep 3


###### end of script ########