[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using of build-variables in hooks



Hi there!

I want to change some config-files with hooks in the chroot.
The mpd.config is one of the most important files here.

I want to use the set HOSTNAME for the live-system in this sed-skript...
So i tried this:


#!/bin/sh

sed -i -e '/bind_to_address/s/localhost/any/' \
    -e '/gapless_mp3_playback/s/^#//' \
    -e '/auto_update/s/^#//' \
    -e '/zeroconf_enabled/s/^#//' \
    -e '/zeroconf_name/s/^#//' -e "/zeroconf_name/s/Music
Player/$HOSTNAME/" \
    -e '/An example of a httpd output/,/}/s/^#//;/An example of a httpd
output/s/^/#/;/\tbitrate/s/^/#/;s/An example of a httpd
output/$LIVE_HOSTNAME-http:8000/' \
    -e '/follow_outside_symlinks/s/^#//' \
    -e '/follow_inside_symlinks/s/^#//' \
/etc/mpd.conf

You see, there is $HOSTNAME and $LIVE_HOSTNAME... both didn't work...
I set up a file in config/includes.chroot/etc/live/config/user-setup.conf
which contains:

LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev
powerdev scanner bluetooth fuse"
LIVE_HOSTNAME="herschel"
LIVE_USERNAME="debian"
LIVE_TIMEZONE="Europe/Vienna"
LIVE_KEYBOARD_LAYOUTS="de"
LIVE_UTC="yes"

This variables are working. The hostname of the live-system is
"herschel", and i find this in /etc/hostname

But how can i use this variables in hooks for a chroot?

Jakob


Reply to: