LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-04-2010, 12:14 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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.
 
Old 02-04-2010, 12:18 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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
 
Old 02-04-2010, 12:19 PM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
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.
Old 02-04-2010, 12:23 PM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK

mmm I'm confused as there isnt a Doinst.sh in slim source?
I'm not a script bash expert so please explaing?
 
Old 02-04-2010, 12:23 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I got a SLKBUILD and a build-slim.sh with the source I got from salixos
 
Old 02-04-2010, 12:25 PM   #6
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
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.
Old 02-04-2010, 12:26 PM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
heres the pkg, please note I have modified it considerably from that one

http://salix.enialis.net/i486/13.0/source/xap/slim/
 
Old 02-04-2010, 12:26 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Ha
hey Gapan, where do i put that command?
 
Old 02-04-2010, 12:29 PM   #9
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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
 
Old 02-04-2010, 12:31 PM   #10
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
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.
Old 02-04-2010, 12:32 PM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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
 
Old 02-04-2010, 12:36 PM   #12
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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
}
 
Old 02-04-2010, 12:38 PM   #13
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
EDIT: sorry just read it well

Last edited by ponce; 02-04-2010 at 12:44 PM.
 
1 members found this post helpful.
Old 02-04-2010, 12:42 PM   #14
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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....
 
Old 02-04-2010, 12:44 PM   #15
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
you can try putting it just before the end bracket on the last line of your buildscript.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with package installs Bodrey Linux - Newbie 3 12-19-2009 10:47 PM
Urpmi package installs are failing iiibbb Mandriva 3 10-26-2006 09:06 AM
Which package installs what RPMS? unixgoose Fedora 3 05-25-2006 07:52 AM
Package not finishing installs jumper220 Fedora - Installation 1 04-02-2004 09:34 PM
package installs... mathfeel Fedora 4 12-01-2003 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration