Skip to content
Snippets Groups Projects
Commit a1f06b62 authored by Diego Pasqualin's avatar Diego Pasqualin
Browse files

Remove unused scripts

parent f8acc2b3
Branches
No related tags found
No related merge requests found
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-base
#
# le-base is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#------------------------------------------------------------------------------
. $(dirname "$(readlink -f $0)")/common-functions.sh
checkUser || exit 1
checkMountedFS || exit 2
loadConf $PREFIX/create-iso.conf $1
DISTRONAME="Linux Educacional"
DISTRORELEASE="5"
# Update casper config
cp -f $TEMPLATES/casper/10adduser-$1 \
$CHROOTDIR/usr/share/initramfs-tools/scripts/casper-bottom/10adduser
cp -f $TEMPLATES/casper/casper $CHROOTDIR/etc/init.d/
# Configures live user@host
if [ "$1" != "home" ] && [ "$1" != "desktop" ]; then
sed -i 's@[Uu]buntu@professor@g' $CHROOTDIR/etc/casper.conf
sed -i 's@HOST="professor"@HOST="le"@g' $CHROOTDIR/etc/casper.conf
else
sed -i 's@[Uu]buntu@le-live@g' $CHROOTDIR/etc/casper.conf
rm -Rf $CHROOTDIR/etc/skel/*
fi
# Sets distro name
DISTRONAME="LE"
DISTRORELEASE="5"
echo "$DISTRONAME $DISTRORELEASE "Lucid Lynx" - Release i386 (20100816.2)" \
> $CDDIR/.disk/info
echo "http://linuxeducacional.c3sl.ufpr.br/" > $CDDIR/.disk/release_notes_url
if [ "$1" != "home" ] && [ "$1" != "desktop" ]; then
chpasswd <<< "root:qwe123"
cat <<EOF >>$CHROOTDIR/etc/sudoers
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
EOF
fi
# configures DVD repository
for package in $(cat $TEMPLATES/le-packages/packgs_list); do
if [ "${package:0:3}" = "lib" ]; then
packageDir="pool/main/${package:0:4}/$package"
elif [ "${package:0:5}" = "linux" ]; then
packageDir="pool/main/${package:0:1}/${package:0:5}"
else
packageDir="pool/main/${package:0:1}/$package"
fi
debFile="$(wget http://$LEHOST/$packageDir/ -O /dev/stdout | grep '.deb' |
cut -d'"' -f8 | tail -n1)"
mkdir -p "$CDDIR/$packageDir"
wget http://$LEHOST/$packageDir/$debFile -O "$CDDIR/$packageDir/$debFile"
done
cd "$CDDIR"
dpkg-scanpackages "pool/main" \
> "$CDDIR/dists/precise/main/binary-i386/Packages"
gzip -c "$CDDIR/dists/precise/main/binary-i386/Packages" \
> "$CDDIR/dists/precise/main/binary-i386/Packages.gz"
rm -f "$CDDIR/dists/precise/main/binary-i386/Packages"
# configures live kernel
#cp -af $CHROOTDIR/boot/$(ls $CHROOTDIR/boot/ | grep "vmlinuz" | sort | tail -n1) $CDDIR/casper/vmlinuz
# configures kdm
cp -f $TEMPLATES/kdm/* $CHROOTDIR/etc/kde4/kdm/
# removes Kubuntu Autorun
rm -rf $CDDIR/wubi.exe $CDDIR/autorun.inf
# run the script to download and install libdvdcss2
# $CHROOTDIR/usr/share/doc/libdvdread4/install-css.sh
exit 0
#!/bin/bash
# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-base
#
# le-base is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#------------------------------------------------------------------------------
. $(dirname "$(readlink -f $0)")/common-functions.sh
checkUser || exit 1
checkMountedFS || exit 2
loadConf $PREFIX/create-iso.conf $1
# Extract initrd image
mkdir -p $TMP/initrd
cd $TMP/initrd || return 1
mkinitramfs -o /boot/initrd$(uname -r).img $(uname -r)
INITRD="$(ls $CHROOTDIR/boot/initrd* | sort | tail -n1)"
if file $INITRD | grep -q "gzip"; then
gunzip -c $INITRD | cpio -id
else
unlzma -c -S .lz $INITRD | cpio -id
fi
unlzma -c -S .lz $CDDIR/casper/initrd.lz | cpio -id
# Change the live user name
#sed -i 's@USERNAME=\"ubuntu\"@USERNAME=\"le5\"@g' $CHROOTDIR/etc/casper.conf
#sed -i 's@USERFULLNAME=\"Live session user\"@USERFULLNAME=\"Linux Educacional 5\"@g' $CHROOTDIR/etc/casper.conf
# Update initrd casper
case "$1" in
escola)
sed -i 's@[Uu]buntu@admin@g' ./etc/casper.conf
sed -i 's@HOST="admin"@HOST="le5-escola"@g' ./etc/casper.conf
;;
*)
sed -i 's@[Uu]buntu@le5-live@g' ./etc/casper.conf
;;
esac
echo "export \"FLAVOUR=le5\"" >> ./etc/casper.conf
date +"%d-%m-%Y" > ./etc/le/data_iso
cp -f $TEMPLATES/casper/10adduser-$1 ./scripts/casper-bottom/25adduser
# Regenarete initrd image
find ./ | cpio --quiet --dereference -o -H newc | lzma -7 \
> $CDDIR/casper/initrd.lz
cp -af $(sed 's/initrd.img/vmlinuz/g' <<< $INITRD) \
$CDDIR/casper/vmlinuz
cd $PREFIX
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment