#!/bin/sh # Source debconf library. . /usr/share/debconf/confmodule # Fetching configuration from debconf #db_get packagename/question1 #ANSWER1=$RET #DEB_VENDOR=$(cat /etc/dpkg/origins/default | grep Vendor: | sed -e "s/Vendor: //") #if [ "$DEB_VENDOR" = "Debian" ] ; then #fi PROF_DIR=/etc/dconf/profile PROF_FILE=user if [ -f $PROF_DIR/$PROF_FILE ] ; then # # Edit user file # grep -q "user-db:user" $PROF_DIR/$PROF_FILE if [ "$?" = "1" ] ; then echo "user-db:user" >> $PROF_DIR/$PROF_FILE fi grep -q "system-db:local" $PROF_DIR/$PROF_FILE if [ "$?" = "1" ] ; then echo "system-db:local" >> $PROF_DIR/$PROF_FILE fi else # # Generate user file # mkdir -p $PROF_DIR cat >$PROF_DIR/$PROF_FILE <$CONF_DIR/$CONF_FILE < /dev/null 2>&1 if [ "$?" = "0" ] ; then dconf update fi