Hi,
I'm trying to modifying the /etc/modprobe.conf file using the template system.
I'm activating ipv6 on my server.
So here is what i did :
mkdir -p /etc/e-smith/templates-custometc/modprobe.conf
cp /etc/e-smith/templates/etc/modprobe.conf/10net-fp-aliases /etc/e-smith/templates-custom/etc/modprobe.conf/
vi /etc/e-smith/templates-custom/etc/modprobe.conf/10net-fp-aliases
And then I remplace
# alias IPV6 off
"alias net-pf-10 off",
By
# alias IPV6 ON
"alias net-pf-10 ipv6",
finally I run the command : expand-template /etc/modprobe.conf
But when I look to the /etc/modprobe.conf
I can see that the 10net-fp-aliases file is executed 2 times...
whereas, according to what I see before, the templates-custom version should have replaced the templates version
and so only one of the two file is executed...
And it seems that for this file, the file itself is the data source... so each time I add a line, it stacks...
So what is the proper way to modify this file ?
I want to put ipv6, but the template system forces it off...
(ie if I remplace off by ipv6, the template system will add a line alias net-pf-10 off at the end of the file)
All i can see is to modify /etc/e-smith/templates/etc/modprobe.conf which sounds dirty to me...
Regards,
Thomas.
here is the resulting file :
[root@home templates-custom]# cat /etc/modprobe.conf
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. Various aliases are added and/or
# deleted by the template processing of the file and white space
# is removed, but otherwise changes to the file are preserved.
# For more information, see
http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/modprobe.conf/.
#
# copyright (C) 2002-2005 Mitel Networks Corporation
#------------------------------------------------------------
alias scsi_hostadapter ata_piix
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias block-major-3 off
alias bond0 bonding
alias char-major-43 hisax
alias net-pf-4 off
alias net-pf-47 ip_gre
alias net-pf-24 pppoe
alias parport_lowlevel parport_pc
alias ppp ppp_generic
alias char-major-108 ppp
alias /dev/ppp ppp
alias tty-ldisc-3 ppp_async
alias tty-ldisc-14 ppp_synctty
alias ppp-compress-18 ppp_mppe
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
alias tap0 off
alias tap1 off
alias tap2 off
alias tap3 off
alias tap4 off
alias tap5 off
alias tap6 off
alias tap7 off
alias tap8 off
alias tap9 off
alias tap10 off
alias tap11 off
alias tap12 off
alias tap13 off
alias tap14 off
alias tap15 off
alias char-major-180 usbcore
alias net-pf-10 ipv6alias net-pf-10 ipv6#testalias eth0 e1000
alias eth1 8139too
options bond0 miimon=200 mode=active-backup
options hisax protocol=2
alias net-pf-10 off