Pages : 1
#1 Le 14/02/2012, à 18:08
- adresse-mail
[sscript] ubuntu-remix !
Salut à tous !
Voici mon script de création automatique d'ubuntu-remix :
#!/bin/bash
ls | grep ubuntu-11.10-desktop-i386.iso
until [ "$?" = "0" ]
do
wget http://fr.releases.ubuntu.com/releases/oneiric/ubuntu-11.10-desktop-i386.iso
done
mount -o loop ubuntu-11.10-desktop-i386.iso /mnt
cp -a /mnt/. iso
umount -lf /mnt
mount -t squashfs -o loop iso/casper/filesystem.squashfs /mnt
cp -a /mnt/. squashfs
umount -lf /mnt
echo "fr" | tee iso/isolinux/lang
sed -i "53c#lzma" iso/casper/filesystem.manifest-remove
sed -i "17c#gparted" iso/casper/filesystem.manifest-remove
sed -i "9c#ecryptfs-utils" iso/casper/filesystem.manifest-remove
rm -rf iso/pics iso/autorun.inf iso/wubi.exe
rm -rf squashfs/etc/skel
cp -a /etc/skel squashfs/etc/skel
chmod -R 775 squashfs/etc/skel
chown -R root:root squashfs/etc/skel
cp /etc/hosts squashfs/etc/hosts
cp /etc/fstab squashfs/etc/fstab
cp /etc/resolv.conf squashfs/etc/resolv.conf
cp /boot/grub/video.lst squashfs/boot/grub/video.lst
cp /etc/apt/sources.list squashfs/etc/apt/sources.list
mount --bind /home squashfs/home
mount --bind /dev squashfs/dev
xhost +
chroot squashfs/ << 'EOF'
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export LC_ALL=C
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
rm -rf /var/run/dbus/*
mkdir /run/dbus
/etc/init.d/dbus start
dbus-daemon --system --fork
apt-get -y remove --purge example-content gnome-games-common gwibber-service
apt-get -y update
apt-get -y dist-upgrade
apt-get -y remove --purge linux-headers-3.0.0-12 linux-image-3.0.0-12-generic
add-apt-repository -y ppa:vicox/syspeek
add-apt-repository -y ppa:tualatrix/ppa
add-apt-repository -y ppa:freetuxtv/freetuxtv
add-apt-repository -y ppa:weather-indicator-team/ppa
add-apt-repository -y ppa:alexmurray/indicator-sensors
apt-get -y update
apt-get -y install gparted indicator-sensors indicator-weather libatm1 synaptic syspeek ubuntu-restricted-extras
apt-get -y install evolution freetuxtv gimp gimp-help-en gimp-help-fr lsb radiotray supertux ubuntu-tweak vlc
sh /usr/share/doc/libdvdread4/install-css.sh
echo "allow-guest=false" >> /etc/lightdm/lightdm.conf
cp /usr/share/sounds/ubuntu/stereo/* /usr/share/sounds
sed -i "23c<allow_active>no</allow_active>" /usr/share/polkit-1/actions/org.freedesktop.upower.policy
sed -i "40c<allow_active>no</allow_active>" /usr/share/polkit-1/actions/org.freedesktop.upower.policy
cat > /usr/share/radiotray/bookmarks.xml << -EOF-
<bookmarks>
<group name="root">
<bookmark name="Rtl" url="http://streaming.radio.rtl.fr/rtl-1-44-96"/>
<bookmark name="Rmc" url="http://vipicecast.yacast.net/rmc"/>
<bookmark name="France Info" url="http://mp3.live.tv-radio.com/franceinfo/all/franceinfo.mp3"/>
<bookmark name="Smooth Jazz" url="http://www.sky.fm/mp3/smoothjazz.pls"/>
<bookmark name="Smooth Groove" url="http://s1.viastreaming.net:8000"/>
<bookmark name="Rfm Night Fever" url="http://vipicecast.yacast.net:80/rfm_webradio02"/>
</group>
</bookmarks>
-EOF-
sed -i "9c<option name=\"gui_engine\" value=\"appindicator\"/>" /usr/share/radiotray/config.xml
cp /usr/share/applications/radiotray.desktop /etc/xdg/autostart
wget -c https://addons.mozilla.org/firefox/downloads/latest/1865/addon-1865-latest.xpi
mv addon-1865* /usr/lib/firefox-addons/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi
wget https://addons.mozilla.org/firefox/downloads/file/135208/unityfox-0.2.2-fx-linux.xpi
mv unityfox* /usr/lib/firefox-addons/extensions/unityfox@mozilla.org.xpi
wget https://addons.mozilla.org/firefox/downloads/latest/2410/addon-2410-latest.xpi
mkdir /usr/lib/firefox-addons/extensions/foxmarks@kei.com
unzip addon-2410* -d /usr/lib/firefox-addons/extensions/foxmarks*
rm -f addon-2410*
wget http://france.real.com/download2/realplayer/11/linux/deb
dpkg -i deb
rm -f deb
wget http://airdownload.adobe.com/air/lin/download/latest/adobeair.deb
dpkg -i ado*
rm -f ado*
apt-get -y clean
update-initramfs -k all -u
/etc/init.d/dbus stop
rm -rf /tmp/*
rm -f /etc/hosts
rm -f /etc/fstab
rm -f /sbin/initctl
rm -f /etc/resolv.conf
rm -f /boot/grub/video.lst
rm -f /var/lib/dbus/machine-id
dpkg-divert --rename --remove /sbin/initctl
umount -lf /dev/pts
umount -lf /sys
umount -lf /proc
EOF
xhost -
umount -lf squashfs/dev
umount -lf squashfs/home
apt-get -y install squashfs-tools
rm -f iso/casper/filesystem.squashfs
chmod a+w iso/casper/filesystem.manifest
chroot squashfs dpkg-query -W --showformat='${Package} ${Version}\n' > iso/casper/filesystem.manifest
chmod go-w iso/casper/filesystem.manifest
cd squashfs
mksquashfs . ../iso/casper/filesystem.squashfs
cd
cp squashfs/boot/vmlinuz-3.0.0-17-generic iso/casper/vmlinuz
cp squashfs/boot/initrd.img-3.0.0-17-generic iso/casper/initrd.lz
cd iso
find . -path ./isolinux -prune -o -type f -not -name md5sum.txt -print0 | xargs -0 md5sum | tee md5sum.txt
cd
mkisofs -r -V "ubuntu-remix" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ubuntu-remix.iso iso
eject
notify-send -i /usr/share/app-install/icons/software-properties.png "Insérez un DVD enr. ⟶ [⤶ Entrée ]"
read -s
wodim -eject ubuntu-remix.iso
rm -rf iso squ* ubu*
exit
Dernière modification par adresse-mail (Le 17/03/2012, à 11:45)
Hors ligne
#2 Le 14/02/2012, à 22:01
- cracolinux
Re : [sscript] ubuntu-remix !
J'aime bien ton code
Hors ligne
Pages : 1