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

Re: dpkg-reconfigure doesn't offer xserver-xfree86/config/device/use_fbdev



On Sun, Sep 29, 2002 at 07:37:08PM -0500, Chris Lawrence wrote:
> I believe the reason is because this option isn't asked when /proc/fb
> is empty; however, it might currently be set to "Yes" and need to be
> changed to "No" for X to run.

There is logic that forces it off if /proc/fb can't be read or contains
nothing.

# use fbcon kernel functions?
if [ -e /proc/fb ]; then
  if [ -n "$(cat /proc/fb)" ]; then
    auto_answer db_input high xserver-xfree86/config/device/use_fbdev "true"
  fi
else
  db_get xserver-xfree86/config/device/use_fbdev || debug_report_status "db_get xserver-xfree86/config/device/use_fbdev" "$?"
  if [ "$RET" = "true" ]; then
    debug_echo "xserver-xfree86/config/device/use_fbdev is \"true\" but /proc/fb does not exist; setting template to \"false\""
    db_set xserver-xfree86/config/device/use_fbdev false
  fi
fi

Oh, I get it.  I don't have an else clause for [ -n "$(cat /proc/fb)" ].

Does this fix your problem?  Please test.

# use fbcon kernel functions?
if [ -e /proc/fb ] && [ -n "$(cat /proc/fb)" ]; then
    auto_answer db_input high xserver-xfree86/config/device/use_fbdev "true"
else
  db_get xserver-xfree86/config/device/use_fbdev || debug_report_status "db_get xserver-xfree86/config/device/use_fbdev" "$?"
  if [ "$RET" = "true" ]; then
    debug_echo "xserver-xfree86/config/device/use_fbdev is \"true\" but /proc/fb is empty or does not exist; setting template to \"false\""
    db_set xserver-xfree86/config/device/use_fbdev false
  fi
fi

(I use [] && [] instead of [ -a ] because -a doesn't short-circuit on
falsity.)

-- 
G. Branden Robinson                |
Debian GNU/Linux                   |       Extra territorium jus dicenti
branden@debian.org                 |       impune non paretur.
http://people.debian.org/~branden/ |

Attachment: pgpPLs6M5cpkx.pgp
Description: PGP signature


Reply to: