public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Christos Kotsi <christo.kotsi@gmail.com>
To: gentoo-catalyst@lists.gentoo.org
Cc: christo.kotsi@gmail.com
Subject: [gentoo-catalyst] [PATCH 5/6] ln,echo and cp commands concentration
Date: Wed, 12 Apr 2017 11:43:48 +0300	[thread overview]
Message-ID: <20170412084349.2017-5-christo.kotsi@gmail.com> (raw)
In-Reply-To: <20170412084349.2017-1-christo.kotsi@gmail.com>

---
 targets/support/livecdfs-update.sh | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 31cdf04..ee0d813 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -78,10 +78,9 @@ fi
 
 # Setup links for ethernet devices
 cd /etc/init.d
-ln -sf net.lo net.eth1
-ln -sf net.lo net.eth2
-ln -sf net.lo net.eth3
-ln -sf net.lo net.eth4
+for i in {1..4}; do
+ln -sf net.lo net.eth${i}
+done
 
 # Add this for hwsetup/mkx86config
 mkdir -p /etc/sysconfig
@@ -105,13 +104,10 @@ fi
 
 # Tweak the livecd make.conf so that users know not to edit it
 # https://bugs.gentoo.org/144647
-mv ${clst_make_conf} ${clst_make_conf}.old
-echo "####################################################" >> ${clst_make_conf}
-echo "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##" >> ${clst_make_conf}
-echo "## PLEASE EDIT /mnt/gentoo${clst_make_conf} INSTEAD  ##" >> ${clst_make_conf}
-echo "####################################################" >> ${clst_make_conf}
-cat ${clst_make_conf}.old >> ${clst_make_conf}
-
+echo -e "####################################################\n$(cat ${clst_make_conf})" > ${clst_make_conf}
+echo -e "## PLEASE EDIT /mnt/gentoo${clst_make_conf} INSTEAD		  ##\n$(cat ${clst_make_conf})" > ${clst_make_conf}
+echo -e "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##\n$(cat ${clst_make_conf})" > ${clst_make_conf}
+echo -e "####################################################\n$(cat ${clst_make_conf})" > ${clst_make_conf}
 # devfs tweaks
 [ -e /etc/devfsd.conf ] && sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf
 
@@ -299,8 +295,7 @@ case ${clst_livecd_type} in
 		USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | sed -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt
 
 		# This is my hack to reduce tmpfs usage
-		cp -r ${clst_repo_basedir}/${clst_repo_name}/profiles /usr/livecd
-		cp -r ${clst_repo_basedir}/${clst_repo_name}/eclass /usr/livecd
+		cp -r ${clst_repo_basedir}/${clst_repo_name}/{profiles,eclass} /usr/livecd
 		rm -rf /usr/livecd/profiles/{co*,default-{1*,a*,b*,d*,h*,i*,m*,p*,s*,x*},g*,hardened-*,n*,x*}
 		mv -f /etc/gconf /usr/livecd
 		ln -sf /usr/livecd/gconf /etc/gconf
@@ -327,10 +322,7 @@ case ${clst_livecd_type} in
 				# Copy our installer icons
 				if [ -e /usr/share/applications/installer-gtk.desktop ]
 				then
-					cp -f /usr/share/applications/installer-gtk.desktop \
-						/home/${username}/Desktop
-					cp -f /usr/share/applications/installer-dialog.desktop \
-						/home/${username}/Desktop
+					cp -f /usr/share/applications/{installer-gtk.desktop,installer-dialog.desktop} /home/${username}/Desktop
 					sed -i -e \
 						's:Exec=installer-dialog:Exec=sudo installer-dialog:' \
 						/home/${username}/Desktop/installer-dialog.desktop
-- 
2.10.2



  parent reply	other threads:[~2017-04-12  8:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  8:43 [gentoo-catalyst] [PATCH 1/6] Concentrated some cp commands Christos Kotsi
2017-04-12  8:43 ` [gentoo-catalyst] [PATCH 2/6] updated gitignore with patches directory Christos Kotsi
2017-04-12 19:20   ` Mike Frysinger
2017-04-12  8:43 ` [gentoo-catalyst] [PATCH 3/6] Concentrated export&delete_from_root lines Christos Kotsi
2017-04-12 19:24   ` Mike Frysinger
2017-04-12  8:43 ` [gentoo-catalyst] [PATCH 4/6] Added some loops Christos Kotsi
2017-04-12  8:43 ` Christos Kotsi [this message]
2017-04-12 19:24   ` [gentoo-catalyst] [PATCH 5/6] ln,echo and cp commands concentration Mike Frysinger
2017-04-12  8:43 ` [gentoo-catalyst] [PATCH 6/6] changed mkdir line for kernels/misc Christos Kotsi
2017-04-13 16:45 ` [gentoo-catalyst] [PATCH 1/6] Concentrated some cp commands Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170412084349.2017-5-christo.kotsi@gmail.com \
    --to=christo.kotsi@gmail.com \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox