[livecd] move all desktop installer items to util-livecd

This commit is contained in:
udeved 2015-06-16 00:18:58 +02:00
parent 09b4290a25
commit ef70c437f8
3 changed files with 37 additions and 16 deletions

View file

@ -141,8 +141,8 @@ configure_calamares(){
if [[ -f $1/usr/bin/kdesu ]];then if [[ -f $1/usr/bin/kdesu ]];then
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/calamares.desktop sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/calamares.desktop
fi fi
cp $1/usr/share/applications/calamares.desktop $1/home/${username}/$(xdg-user-dir DESKTOP)/calamares.desktop # cp $1/usr/share/applications/calamares.desktop $1/home/${username}/$(xdg-user-dir DESKTOP)/calamares.desktop
chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/calamares.desktop # chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/calamares.desktop
fi fi
} }
@ -168,19 +168,19 @@ configure_thus(){
if [[ -f $1/usr/bin/kdesu ]];then if [[ -f $1/usr/bin/kdesu ]];then
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
fi fi
cp $1/usr/share/applications/thus.desktop $1/home/${username}/$(xdg-user-dir DESKTOP)/thus.desktop # cp $1/usr/share/applications/thus.desktop $1/home/${username}/$(xdg-user-dir DESKTOP)/thus.desktop
chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/thus.desktop # chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/thus.desktop
fi fi
} }
configure_cli(){ # configure_cli(){
if [[ -f $1/usr/bin/setup ]]||[[ -L $1/usr/bin/setup ]];then # if [[ -f $1/usr/bin/setup ]]||[[ -L $1/usr/bin/setup ]];then
msg2 "Configuring cli-installer ..." # msg2 "Configuring cli-installer ..."
if [[ -f $1/usr/share/applications/installer-launcher-cli.desktop ]];then # if [[ -f $1/usr/share/applications/installer-launcher-cli.desktop ]];then
#cp $1/etc/skel/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop # #cp $1/etc/skel/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop
cp $1/usr/share/applications/installer-launcher-cli.desktop # cp $1/usr/share/applications/installer-launcher-cli.desktop
$1/home/${username}/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop # $1/home/${username}/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop
fi # fi
chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop # chmod a+x $1/home/${username}/$(xdg-user-dir DESKTOP)/installer-launcher-cli.desktop
fi # fi
} # }

View file

@ -348,7 +348,7 @@ configure_livecd_image(){
configure_services_live "$1" configure_services_live "$1"
configure_calamares "$1" configure_calamares "$1"
configure_thus "$1" configure_thus "$1"
configure_cli "$1" # configure_cli "$1"
msg "Done configuring [livecd-image]" msg "Done configuring [livecd-image]"
} }

View file

@ -419,6 +419,27 @@ configure_doc(){
"/home/${username}/$(xdg-user-dir DESKTOP)/Beginner User Guide.pdf" "/home/${username}/$(xdg-user-dir DESKTOP)/Beginner User Guide.pdf"
} }
configure_desktop_items(){
local xdg=$1/home/${username}/$(xdg-user-dir DESKTOP) \
src=$1/usr/share/applications
if [[ -f $1/usr/bin/thus ]];then
cp $src/thus.desktop $xdg/thus.desktop
chmod a+x $xdg/thus.desktop
fi
if [[ -f $1/usr/bin/calamares ]];then
cp $src/calamares.desktop $xdg/calamares.desktop
chmod a+x $xdg/calamares.desktop
fi
if [[ -f $1/usr/bin/setup ]] || [[ -L $1/usr/bin/setup ]];then
cp $src/installer-launcher-cli.desktop $xdg/installer-launcher-cli.desktop
chmod a+x $xdg/installer-launcher-cli.desktop
fi
fi
}
configure_user_root(){ configure_user_root(){
# set up root password # set up root password
echo "root:${password}" | chroot $1 chpasswd echo "root:${password}" | chroot $1 chpasswd