]> git.donarmstrong.com Git - neurodebian.git/blobdiff - vm/d-i/tools/initial_setup
sensible (-dev files) and opportunitstic (gnome-core) lightweighting of VM image
[neurodebian.git] / vm / d-i / tools / initial_setup
old mode 100644 (file)
new mode 100755 (executable)
index f14fb11..31d0ccd
@@ -15,6 +15,11 @@ set -u
 # hostname: neurodebian
 # domain: ''
 
+# Needs to be assured since it got reset to debian
+hostname neurodebian  # this is not a permanent change
+echo "neurodebian" >| /etc/hostname  # make it permanent
+sed -i -e 's/^127\.0\.1\.1.*/127.0.1.1\tneurodebian/g' /etc/hosts
+
 # all file in one partition
 
 # root: not there
@@ -29,10 +34,10 @@ set -u
 # just base system, run selection, but no tasks (not even 'Standard system')
 
 # set root password to 'neurodebian' too
-echo "Set root passwd:"
-passwd root
+#echo "Set root passwd:"
+#passwd root
 
-apt-get install --no-install-recommends etckeeper
+apt-get install --no-install-recommends -y etckeeper
 
 # setup etckeeper
 git config --global user.name NeuroDebian
@@ -51,30 +56,46 @@ Pin: release a=squeeze-backports
 Pin-Priority: 200
 EOT
 
-apt-get update
-apt-get install neurodebian-keyring
-apt-get update
+apt-get update -y
+# Backports' Release files signed with both ftpmaster and old backports keys
+# That causes APT to spit out a warning, but to not confuse users, lets simply
+# obtain that key if possible
+gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16BA136C && \
+        gpg --export 16BA136C | apt-key add - || :
+
+apt-get install -y --allow-unauthenticated neurodebian-keyring
+apt-get update -y
 
 # to cheat the VM check
 touch /dev/vboxguest
 # to get all the stuff in recommends
-apt-get install dkms neurodebian-guest-additions
+apt-get install -y dkms neurodebian-guest-additions
 
-apt-get install --no-install-recommends \
+apt-get install --no-install-recommends -y \
  gnome-core mc evince bash-completion ntpdate file-roller gnome-utils \
  gnome-themes eog vim \
- software-center gdebi gedit-plugins gnome-media synaptic menu less
+ software-center gdebi gedit-plugins gnome-media synaptic menu less libxp6
+
+# Clean-up installed development files which got pulled in for some reason
+apt-get purge -y libc6-dev
+dpkg -l | grep '^ii.*linux-headers' | xargs -r apt-get purge -y
+
+# Gnome optional pulled by gnome-core:
+apt-get purge -y gnome-core evolution-common evolution libevolution
+
+# And utter cleanup
+apt-get autoremove
 
 # intermediate cleanup to prevent virtual harddrive from fragmenting too much
 find /var/cache/apt/archives/ -name '*.deb' -delete
 
 # cleanup unwanted stuff
 # video drivers (all but vesa)
-apt-get purge $(apt-cache search --names-only --installed xserver-xorg-video | grep xserver-xorg-video | cut -d ' ' -f 1,1) xserver-xorg-video-vesa+
-apt-get purge brasero
+apt-get purge -y $(apt-cache search --names-only --installed xserver-xorg-video | grep xserver-xorg-video | cut -d ' ' -f 1,1) xserver-xorg-video-vesa+
+apt-get purge -y brasero
 
 # and whatever is obsolete
-apt-get autoremove --purge
+apt-get autoremove --purge -y
 
 # custom config
 # use NeuroDebian website as default homepage
@@ -89,3 +110,7 @@ sed -i -e "s/10.0.0.1:9999/$(dpkg --print-architecture)-geomirror.debian.net/" \
     -e "s/^deb-src/#deb-src/" /etc/apt/sources.list
 
 etckeeper commit "Initial VM setup done"
+
+# Create a link to automatically mounted Shared folder
+# Created by the Welcome Wizard
+#sudo -u brain ln -s /mnt/host /home/brain/