[molecule.examples.scripts] update more example scripts
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/sbin/env-update
|
||||
source /etc/profile
|
||||
|
||||
for arg in $*; do
|
||||
[[ "${arg}" = "spinbase" ]] && SPINBASE="1"
|
||||
done
|
||||
/usr/sbin/env-update && source /etc/profile
|
||||
|
||||
# Setup locale to en_US
|
||||
echo LANG=\"en_US.UTF-8\" > /etc/env.d/02locale
|
||||
@@ -24,7 +20,7 @@ sed -i 's:exec -l /bin/bash:exec -l /bin/bash -l:' /bin/bashlogin
|
||||
[ -e /etc/sudoers ] && sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
|
||||
|
||||
# setup opengl in /etc (if configured)
|
||||
[[ -z "${SPINBASE}" ]] && eselect opengl set xorg-x11
|
||||
eselect opengl set xorg-x11 &> /dev/null
|
||||
|
||||
# touch /etc/asound.state
|
||||
touch /etc/asound.state
|
||||
@@ -32,37 +28,6 @@ touch /etc/asound.state
|
||||
update-pciids
|
||||
update-usbids
|
||||
|
||||
if [ -z "${SPINBASE}" ]; then
|
||||
# Prepare NVIDIA legacy drivers infrastructure
|
||||
|
||||
if [ ! -d "/install-data/drivers" ]; then
|
||||
mkdir -p /install-data/drivers
|
||||
fi
|
||||
myuname=$(uname -m)
|
||||
mydir="x86"
|
||||
if [ "$myuname" == "x86_64" ]; then
|
||||
mydir="amd64"
|
||||
fi
|
||||
kernel_tag="#$(equo query installed -qv sys-kernel/linux-sabayon | sort | head -n 1 | cut -d"-" -f 4 | sed 's/ //g')-sabayon"
|
||||
|
||||
rm -rf /var/lib/entropy/packages*/${mydir}/5/x11-drivers*
|
||||
ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps =x11-drivers/nvidia-drivers-173*$kernel_tag
|
||||
ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps =x11-drivers/nvidia-drivers-96*$kernel_tag
|
||||
# testing xorg-server-1.5 support
|
||||
# ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps ~x11-drivers/nvidia-drivers-71.86.*$kernel_tag
|
||||
mv /var/lib/entropy/packages-nonfree/${mydir}/*/x11-drivers\:nvidia-drivers*.tbz2 /install-data/drivers/
|
||||
|
||||
# Add fusion icon to desktop
|
||||
if [ -f "/usr/share/applications/fusion-icon.desktop" ]; then
|
||||
cp /usr/share/applications/fusion-icon.desktop /etc/skel/Desktop/
|
||||
fi
|
||||
fi
|
||||
|
||||
# EXPERIMENTAL, clean icon cache files
|
||||
for file in `find /usr/share/icons -name "icon-theme.cache"`; do
|
||||
rm $file
|
||||
done
|
||||
|
||||
echo -5 | etc-update
|
||||
mount -t proc proc /proc
|
||||
/lib/rc/bin/rc-depend -u
|
||||
@@ -81,34 +46,15 @@ umount /proc
|
||||
equo deptest --pretend
|
||||
emaint --fix world
|
||||
|
||||
# remove anaconda .git
|
||||
rm /opt/anaconda/.git -rf
|
||||
rm /opt/anaconda/usr/share/anaconda/po/*.po -rf
|
||||
|
||||
|
||||
# copy Portage config from sabayonlinux.org entropy repo to system
|
||||
cp /var/lib/entropy/client/database/*/sabayonlinux.org/standard/*/*/package.mask /etc/portage/package.mask
|
||||
cp /var/lib/entropy/client/database/*/sabayonlinux.org/standard/*/*/package.unmask /etc/portage/package.unmask
|
||||
cp /var/lib/entropy/client/database/*/sabayonlinux.org/standard/*/*/package.use /etc/portage/package.use
|
||||
[[ -z "${SPINBASE}" ]] && cp /var/lib/entropy/client/database/*/sabayonlinux.org/standard/*/*/make.conf /etc/make.conf
|
||||
cp /var/lib/entropy/client/database/*/sabayonlinux.org/standard/*/*/make.conf /etc/make.conf
|
||||
|
||||
# Update sabayon overlay
|
||||
layman -s sabayon
|
||||
if [ -z "${SPINBASE}" ]; then
|
||||
layman -d sabayon
|
||||
rm -rf /var/lib/layman/sabayon
|
||||
fi
|
||||
|
||||
# if Sabayon GNOME, drop qt-gui bins
|
||||
gnome_panel=$(qlist -ICve gnome-base/gnome-panel)
|
||||
if [ -n "${gnome_panel}" ]; then
|
||||
find /usr/share/applications -name "*qt-gui*.desktop" | xargs rm
|
||||
fi
|
||||
# we don't want this on our ISO
|
||||
rm -f /usr/share/applications/sandbox.desktop
|
||||
|
||||
# Remove wicd from autostart
|
||||
rm -f /usr/share/autostart/wicd-tray.desktop /etc/xdg/autostart/wicd-tray.desktop
|
||||
layman -d sabayon
|
||||
rm -rf /var/lib/layman/sabayon
|
||||
|
||||
# Reset users' password
|
||||
echo "sabayonuser:" | chpasswd
|
||||
@@ -127,9 +73,6 @@ if [ ! -d "/var/run/screen" ]; then
|
||||
chown root:utmp /var/run/screen
|
||||
fi
|
||||
|
||||
# Revert to blocked entropy repo URL
|
||||
sed -i 's/pkgbuild.sabayon.org/pkg.sabayon.org/g' /etc/entropy/repositories.conf
|
||||
|
||||
# Tweak user groups
|
||||
usermod -a -G lpadmin sabayonuser
|
||||
|
||||
|
||||
Reference in New Issue
Block a user