1

I called sudo apt-get dist-upgrade. Everything worked fine for some time. Then terminal asked me this :

Configuration file '/etc/udev/rules.d/99-com.rules'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** 99-com.rules (Y/I/N/O/D/Z) [default=N] ? 

What should I do?

  • The default option seems like a pretty safe choice to me. Assuming your system is working like you want it to, I don't see how not changing this file may get you in trouble. – Dmitry Grigoryev Mar 2 '17 at 9:17
  • Probably I would do that. – bcan Mar 2 '17 at 9:54
1

These are pi specific rules for setting access mode on device nodes (in /dev; these are created by the kernel and tweaked by udev) such as i2c-dev[N] and gpiomem, and symlinks for the UART.

They are not particularly lengthy or complicated. A fairly current version looks like this:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
        chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
        chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
        chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
                echo 0; \
        elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi \
'", SYMLINK+="serial%c"

If you did not modify the old one, I don't know what would have (pretty sure rpi-update and raspi-config do not), but this could in fact just be a minor mistake. I usually just say use the package version in that case, but you may want to have a look at the D option ("show the differences between the versions") to see if anything jumps out that you think might have been added to your current version by some piece of software.

If you do just say yes, check after the update is done to see that it looks like the one above.

  • Pressed D couldn't get back to terminal. Reopened terminal. It says it is already in use. Restarted pi. OS is down. recovered OS from noobs. I learned why they call it noobs now. – bcan Mar 2 '17 at 9:47
  • Yeah -- arbitrarily interrupted system upgrades can screw things up if they happen at the wrong moment. :( – goldilocks Mar 2 '17 at 9:48
  • 1
    @Bcan I believe you were expected to press Q (as in "quit") to get back. – Dmitry Grigoryev Mar 2 '17 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.