Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
02-04-2010, 12:14 PM
|
#1
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
|
In slack 13; what package installs /etc/rc.d/rc.4 script?
I'm trying to figure out how to configure my customized Slim DM
to overwrite the installed /etc/rc.d/rc.4 script with the one I put in
my slim build from source
However, it just installs it as rc.4.new and not rc.4
why?
would it be easier to instead configure the rc.4 that initially gets installed?
if so, what slack pkg has the /etc/rc.d/* folder??
I'm doing this with Absolute 13.0.8 install cd as its installed size is too big for my lappy hdd and it comes with both gdm and xdm
and I want slim.
So, I removed many many pkgs from install iso, got it down to 370MB and only problem is after install
my rc.4 is in /etc/rc.d but its named rc.4.new and there is also the original rc.4
thats my only issue
How do i do this?
Last edited by linus72; 02-04-2010 at 12:15 PM.
|
|
|
|
02-04-2010, 12:18 PM
|
#2
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
To elaborate more, heres the custom rc.4 I need to have installed when i install from my iso
Code:
#! /bin/sh
#
# rc.4 This file is executed by init(8) when the system is being
# initialized for run level 4 (XDM)
#
# Version: @(#)/etc/rc.d/rc.4 2.00 02/17/93
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# At least 47% rewritten by: Patrick J. Volkerding <volkerdi@slackware.com>
#
# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."
# --- 8< --------------------------------------------------------------------
# Try to use SLiM login manager. This comes first because if
# SLiM is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/bin/slim ]; then
exec /usr/bin/slim
fi
# --- 8< --------------------------------------------------------------------
# Try to use GNOME's gdm session manager. This comes first because if
# gdm is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/bin/gdm ]; then
exec /usr/bin/gdm -nodaemon
fi
# Someone thought that gdm looked prettier in /usr/sbin,
# so look there, too:
if [ -x /usr/sbin/gdm ]; then
exec /usr/sbin/gdm -nodaemon
fi
# Not there? OK, try to use KDE's kdm session manager:
if [ -x /opt/kde/bin/kdm ]; then
exec /opt/kde/bin/kdm -nodaemon
elif [ -x /usr/bin/kdm ]; then
exec /usr/bin/kdm -nodaemon
fi
# If all you have is XDM, I guess it will have to do:
if [ -x /usr/bin/xdm ]; then
exec /usr/bin/xdm -nodaemon
elif [ -x /usr/X11R6/bin/xdm ]; then
exec /usr/X11R6/bin/xdm -nodaemon
fi
# error
echo
echo "Hey, you don't have KDM, GDM, or XDM. Can't use runlevel 4 without"
echo "one of those installed."
sleep 30
# All done.
I need the highlighted section in the rc.4 script
|
|
|
|
02-04-2010, 12:19 PM
|
#3
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,933
|
http://www.slackwiki.org/Doinst.sh
you can see lot of examples how to include customized doinst.sh in slackware sources
at, for example, has this line near the end of the slackbuild, just before makepkg
Code:
zcat $CWD/doinst.sh > $PKG/install/doinst.sh
(maybe should be "zcat $CWD/doinst.sh.gz", someone gotta tell Pat  I was only looking for an example, LOL)
you can find the build files here.
Last edited by ponce; 02-05-2010 at 08:59 AM.
|
|
|
1 members found this post helpful.
|
02-04-2010, 12:23 PM
|
#4
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
OK
mmm I'm confused as there isnt a Doinst.sh in slim source?
I'm not a script bash expert so please explaing?
|
|
|
|
02-04-2010, 12:23 PM
|
#5
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
I got a SLKBUILD and a build-slim.sh with the source I got from salixos
|
|
|
|
02-04-2010, 12:25 PM
|
#6
|
|
Member
Registered: Feb 2007
Posts: 336
Rep: 
|
Code:
mv /etc/rc.d/rc.4.new /etc/rc.d/rc.4
that would certainly work. Or you could just edit the existing rc.4 with the changes.
Last edited by gapan; 02-04-2010 at 12:27 PM.
|
|
|
1 members found this post helpful.
|
02-04-2010, 12:26 PM
|
#7
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
heres the pkg, please note I have modified it considerably from that one
http://salix.enialis.net/i486/13.0/source/xap/slim/
|
|
|
|
02-04-2010, 12:26 PM
|
#8
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
Ha
hey Gapan, where do i put that command?
|
|
|
|
02-04-2010, 12:29 PM
|
#9
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
Heres the modified makefile in source
I removed all the themes, added my icelite theme
and highlighted the rc.4 command
Code:
# Makefile for slim - generic Linux
#
# Edit the following section to adjust the options
# to fit into your operating system / distribution
#######################################################
CXX=/usr/bin/g++
CC=/usr/bin/gcc
CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
CXXFLAGS=$(CFLAGS)
LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg
CUSTOM=-DHAVE_SHADOW
ifdef USE_PAM
LDFLAGS+= -lpam
CUSTOM+= -DUSE_PAM
endif
PREFIX=/usr
CFGDIR=/etc
MANDIR=/usr/man
DESTDIR=
#######################################################
NAME=slim
VERSION=1.3.1
DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
-DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o panel.o
ifdef USE_PAM
OBJECTS+=PAM.o
endif
all: slim
slim: $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
.cpp.o:
$(CXX) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
.c.o:
$(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
install: slim install-theme
install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf && install -D -m 644 rc.4 $(DESTDIR)$(CFGDIR)/rc.d/rc.4
clean:
@rm -f slim *.o
dist:
@rm -rf $(NAME)-$(VERSION)
@mkdir $(NAME)-$(VERSION)
@cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog INSTALL README TODO \
xinitrc.sample slim.1 rc.4 THEMES themes slim.conf $(NAME)-$(VERSION)
@rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
@tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
@rm -rf $(NAME)-$(VERSION)
install-theme:
install -D -m 644 themes/default/slim.theme \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
install -D -m 644 themes/default/panel.png \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
install -D -m 644 themes/default/background.jpg \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg
install -D -m 644 themes/icelite/slim.theme \
$(DESTDIR)$(PREFIX)/share/slim/themes/icelite/slim.theme
install -D -m 644 themes/icelite/panel.png \
$(DESTDIR)$(PREFIX)/share/slim/themes/icelite/panel.png
install -D -m 644 themes/icelite/background.jpg \
$(DESTDIR)$(PREFIX)/share/slim/themes/icelite/background.jpg
|
|
|
|
02-04-2010, 12:31 PM
|
#10
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,933
|
first time I see a salix buildscript, but reading it I suppose after
Code:
for i in ${dotnew[@]}; do
echo "dotnew $i" >> $startdir/pkg/install/doinst.sh
done
fi
add
Code:
echo "mv /etc/rc.d/rc.4.new /etc/rc.d/rc.4" >> $startdir/pkg/install/doinst.sh
just before the closing bracket, on a separate line
Last edited by ponce; 02-04-2010 at 12:36 PM.
|
|
|
1 members found this post helpful.
|
02-04-2010, 12:32 PM
|
#11
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
The end result of ./build-slim.sh
Code:
Creating Slackware package: /root/Desktop/SLIM/nubuild/slim-1.3.1-i486-1gv.txz
./
install/
install/slack-desc
install/doinst.sh
usr/
usr/bin/
usr/bin/slim
usr/man/
usr/man/man1/
usr/man/man1/slim.1.gz
usr/share/
usr/share/slim/
usr/share/slim/themes/
usr/share/slim/themes/icelite/
usr/share/slim/themes/icelite/background.jpg
usr/share/slim/themes/icelite/slim.theme
usr/share/slim/themes/icelite/panel.png
usr/share/slim/themes/default/
usr/share/slim/themes/default/background.jpg
usr/share/slim/themes/default/slim.theme
usr/share/slim/themes/default/panel.png
usr/src/
usr/src/slim-1.3.1/
usr/src/slim-1.3.1/slim-1.3.1.tar.gz
usr/src/slim-1.3.1/build-slim.sh
usr/src/slim-1.3.1/SLKBUILD
usr/doc/
usr/doc/slim-1.3.1/
usr/doc/slim-1.3.1/INSTALL
usr/doc/slim-1.3.1/ChangeLog
usr/doc/slim-1.3.1/COPYING
usr/doc/slim-1.3.1/README
usr/doc/slim-1.3.1/THEMES
usr/doc/slim-1.3.1/TODO
etc/
etc/rc.d/
etc/rc.d/rc.4.new
etc/slim.conf.new
Slackware package /root/Desktop/SLIM/nubuild/slim-1.3.1-i486-1gv.txz created.
Package has been built.
Cleaning pkg and src directories
|
|
|
|
02-04-2010, 12:36 PM
|
#12
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
Heres the modified SLKBUILD
what do I change?
Code:
#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>
pkgname=slim
pkgver=1.3.1
pkgrel=1gv
arch=i486
source=slim-1.3.1.tar.gz
sourcetemplate=
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "themes")
url=http://slim.berlios.de/
slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"slim - Simple Login Manager"
"SLiM is a Desktop-independent graphical login manager for X11, derived"
"from Login.app. It aims to be light and simple, although completely"
"configurable through themes and an option file; is suitable for"
"machines on which remote login functionalities are not needed."
)
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i "s/CFLAGS=/CFLAGS+= /" Makefile
make || return 1
make install DESTDIR=$startdir/pkg
THEMES="icelite"
for i in $THEMES; do
cp -a $startdir/src/$i $startdir/pkg/usr/share/slim/themes
done
chown -R root:root $startdir/pkg/usr/share/slim/themes
sed -i "s/current_theme\(.*\)/current_theme icelite/" $startdir/pkg/etc/slim.conf
}
|
|
|
|
02-04-2010, 12:38 PM
|
#13
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,933
|
EDIT: sorry just read it well
Last edited by ponce; 02-04-2010 at 12:44 PM.
|
|
|
1 members found this post helpful.
|
02-04-2010, 12:42 PM
|
#14
|
|
Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057
Original Poster
|
this is my only snag, i got the install down fron 3.6+ gb to 1.9 gb but at runlevel 4 it hits the orig rc.4 and stops cause the slim part aint in rc.4....
|
|
|
|
02-04-2010, 12:44 PM
|
#15
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,933
|
you can try putting it just before the end bracket on the last line of your buildscript.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:59 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|