summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-02-20 00:25:52 +0100
committer Eric Hameleers <alien@slackware.com>2020-02-20 00:25:52 +0100
commitd4be8fc997b1ae2e2950320d050b34097decc2b5 (patch)
tree248d53835451b703d7f617d4ab850622d2593f4a /make_slackware_live.sh
parent284de8f6372a547f1ab464eb3dc37279e94093b0 (diff)
downloadliveslak-d4be8fc997b1ae2e2950320d050b34097decc2b5.tar.gz
liveslak-d4be8fc997b1ae2e2950320d050b34097decc2b5.tar.xz
make_slackware_live.sh: some cosmetic fixes.
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh125
1 files changed, 67 insertions, 58 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index b7136ce..05a7398 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -1455,6 +1455,73 @@ chmod 640 ${LIVE_ROOTDIR}/etc/sudoers
sed -i ${LIVE_ROOTDIR}/etc/sudoers -e 's/# *\(%wheel\sALL=(ALL)\sALL\)/\1/'
chmod 440 ${LIVE_ROOTDIR}/etc/sudoers
+# Add some convenience to the bash shell:
+mkdir -p ${LIVE_ROOTDIR}/etc/skel/
+cat << "EOT" > ${LIVE_ROOTDIR}/etc/skel/.profile
+# Source a .bashrc if it exists:
+[[ -r ~/.bashrc ]] && . ~/.bashrc
+
+# Define some useful aliases:
+alias ll="ls -la $LS_OPTIONS"
+lsp() { basename $(ls -1 "/var/log/packages/$@"*) ; }
+alias md="mkdir"
+alias tarview="tar -tvf"
+# GREP_OPTIONS="--color=auto" is deprecated, use alias to enable colored output:
+alias grep="grep --color=auto"
+alias fgrep="fgrep --color=auto"
+alias egrep="egrep --color=auto"
+
+# Ctrl-D should not log us off immediately; now it needs 10 times:
+set -o ignoreeof
+EOT
+
+# Do the root account the same favor:
+cat ${LIVE_ROOTDIR}/etc/skel/.profile > ${LIVE_ROOTDIR}/root/.profile
+chown root:root ${LIVE_ROOTDIR}/root/.profile
+
+# If the 'vi' symlink doees not exist, add it:
+if [ ! -e ${LIVE_ROOTDIR}/usr/bin/vi ]; then
+ if [ -x ${LIVE_ROOTDIR}/usr/bin/elvis ]; then
+ ln -s elvis ${LIVE_ROOTDIR}/usr/bin/vi
+ else
+ ln -s vim ${LIVE_ROOTDIR}/usr/bin/vi
+ fi
+fi
+
+if [ -f ${LIVE_ROOTDIR}/etc/rc.d/rc.networkmanager ]; then
+ # Enable NetworkManager if present:
+ chmod +x ${LIVE_ROOTDIR}/etc/rc.d/rc.networkmanager
+ # And disable Slackware's own way of configuring eth0:
+ cat <<EOT > ${LIVE_ROOTDIR}/etc/rc.d/rc.inet1.conf
+IFNAME[0]="eth0"
+IPADDR[0]=""
+NETMASK[0]=""
+USE_DHCP[0]=""
+DHCP_HOSTNAME[0]=""
+
+GATEWAY=""
+DEBUG_ETH_UP="no"
+EOT
+
+ # Ensure that NetworkManager uses its internal DHCP client - seems to give
+ # better compliancy:
+ sed -e "s/^dhcp=dhcpcd/#&/" -e "s/^#\(dhcp=internal\)/\1/" \
+ -i ${LIVE_ROOTDIR}/etc/NetworkManager/NetworkManager.conf
+
+else
+ # Use Slackware's own network configurion routing for eth0 in the base image:
+ cat <<EOT > ${LIVE_ROOTDIR}/etc/rc.d/rc.inet1.conf
+IFNAME[0]="eth0"
+IPADDR[0]=""
+NETMASK[0]=""
+USE_DHCP[0]="yes"
+DHCP_HOSTNAME[0]="${LIVE_HOSTNAME}"
+
+GATEWAY=""
+DEBUG_ETH_UP="no"
+EOT
+fi
+
# Enable a Slackware mirror for slackpkg:
cat <<EOT >> ${LIVE_ROOTDIR}/etc/slackpkg/mirrors
#http://mirrors.slackware.com/slackware/slackware${DIRSUFFIX}-${SL_VERSION}/
@@ -1519,40 +1586,6 @@ yes o | ARCH=${SL_ARCH} /usr/sbin/slackpkg new-config
EOSL
-if [ -f ${LIVE_ROOTDIR}/etc/rc.d/rc.networkmanager ]; then
- # Enable NetworkManager if present:
- chmod +x ${LIVE_ROOTDIR}/etc/rc.d/rc.networkmanager
- # And disable Slackware's own way of configuring eth0:
- cat <<EOT > ${LIVE_ROOTDIR}/etc/rc.d/rc.inet1.conf
-IFNAME[0]="eth0"
-IPADDR[0]=""
-NETMASK[0]=""
-USE_DHCP[0]=""
-DHCP_HOSTNAME[0]=""
-
-GATEWAY=""
-DEBUG_ETH_UP="no"
-EOT
-
- # Ensure that NetworkManager uses its internal DHCP client - seems to give
- # better compliancy:
- sed -e "s/^dhcp=dhcpcd/#&/" -e "s/^#\(dhcp=internal\)/\1/" \
- -i ${LIVE_ROOTDIR}/etc/NetworkManager/NetworkManager.conf
-
-else
- # Use Slackware's own network configurion routing for eth0 in the base image:
- cat <<EOT > ${LIVE_ROOTDIR}/etc/rc.d/rc.inet1.conf
-IFNAME[0]="eth0"
-IPADDR[0]=""
-NETMASK[0]=""
-USE_DHCP[0]="yes"
-DHCP_HOSTNAME[0]="${LIVE_HOSTNAME}"
-
-GATEWAY=""
-DEBUG_ETH_UP="no"
-EOT
-fi
-
# Add our scripts to the Live OS:
mkdir -p ${LIVE_ROOTDIR}/usr/local/sbin
install -m0755 ${LIVE_TOOLDIR}/makemod ${LIVE_TOOLDIR}/iso2usb.sh ${LIVE_TOOLDIR}/upslak.sh ${LIVE_ROOTDIR}/usr/local/sbin/
@@ -1705,30 +1738,6 @@ chown --reference=${LIVE_ROOTDIR}/home/${LIVEUID} ${LIVE_ROOTDIR}/home/${LIVEUID
mkdir -p ${LIVE_ROOTDIR}/usr/share/apps/kdm/pics/users
cp ${LIVE_TOOLDIR}/blueSW-64px.png ${LIVE_ROOTDIR}/usr/share/apps/kdm/pics/users/blues.icon
-# Add some convenience to the bash shell:
-mkdir -p ${LIVE_ROOTDIR}/etc/skel/
-cat << "EOT" > ${LIVE_ROOTDIR}/etc/skel/.profile
-# Source a .bashrc if it exists:
-[[ -r ~/.bashrc ]] && . ~/.bashrc
-
-# Define some useful aliases:
-alias ll="ls -la $LS_OPTIONS"
-lsp() { basename $(ls -1 "/var/log/packages/$@"*) ; }
-alias md="mkdir"
-alias tarview="tar -tvf"
-# GREP_OPTIONS="--color=auto" is deprecated, use alias to enable colored output:
-alias grep="grep --color=auto"
-alias fgrep="fgrep --color=auto"
-alias egrep="egrep --color=auto"
-
-# Ctrl-D should not log us off immediately; now it needs 10 times:
-set -o ignoreeof
-EOT
-
-# Do the root account the same favor:
-cat ${LIVE_ROOTDIR}/etc/skel/.profile > ${LIVE_ROOTDIR}/root/.profile
-chown root:root ${LIVE_ROOTDIR}/root/.profile
-
# Give XDM a nicer look:
mkdir -p ${LIVE_ROOTDIR}/etc/X11/xdm/liveslak-xdm
cp -a ${LIVE_TOOLDIR}/xdm/* ${LIVE_ROOTDIR}/etc/X11/xdm/liveslak-xdm/