mac下非root用户下现在已经能找到设备:
修改RXTX_Tiger.pkg包中文件
1、Rxtx_tiger.pkg/rxtx_tiger.pkg/Contents/Resources/perinstall文件
修改前:
#!/bin/sh
curruser=`sudo id -p | grep 'login' | sed 's/login.//'`
echo $curruser
if [ ! -d /var/lock ]
then
sudo mkdir /var/lock
fi
sudo chgrp uucp /var/lock
sudo chmod 775 /var/lock
if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ]
then
sudo niutil . –mergeprop / /groups/uucp users $curruser
fi
exit 0;
修改后
#!/bin/sh
curruser=`sudo id -p | grep 'login' | sed 's/login.//'`
echo $curruser
if [ ! -d /var/lock ]
then
sudo mkdir /var/lock
fi
sudo chgrp uucp /var/lock
sudo chmod 775 /var/lock
if [ ! `sudo dscl . -readpl /groups/uucp users | grep $curruser > /dev/null` ]
then
sudo dscl . -merge /groups/uucp users $curruser
fi
exit 0;
1、Rxtx_tiger.pkg/rxtx_tiger.pkg/Contents/Resources/preupgrade文件
修改前:
#!/bin/sh
curruser=`sudo id -p | grep 'login' | sed 's/login.//'`
echo $curruser
if [ ! -d /var/lock ]
then
sudo mkdir /var/lock
fi
sudo chgrp uucp /var/lock
sudo chmod 775 /var/lock
if [ ! `sudo niutil -readprop / /groups/uucp users | grep $curruser > /dev/null` ]
then
sudo niutil . –mergeprop / /groups/uucp users $curruser
fi
exit 0;
修改后
#!/bin/sh
curruser=`sudo id -p | grep 'login' | sed 's/login.//'`
echo $curruser
if [ ! -d /var/lock ]
then
sudo mkdir /var/lock
fi
sudo chgrp uucp /var/lock
sudo chmod 775 /var/lock
if [ ! `sudo dscl . -readpl /groups/uucp users | grep $curruser > /dev/null` ]
then
sudo dscl . -merge /groups/uucp users $curruser
fi
exit 0;