#!/bin/sh ### # Place the NetworkManager init script. ### config() { NEW="$1" OLD="`dirname $NEW`/`basename $NEW .new`" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for the admin to consider... } config etc/rc.d/rc.networkmanager.new ### # Create netdev group if they don't exist. ### group_exists=`grep ^netdev etc/group` if [[ "${group_exists}" == "" ]]; then groupadd -g 63 netdev fi # if rc.networkmanager is executable, run it on startup run=`grep ". /etc/rc.d/rc.networkmanager" etc/rc.d/rc.local` if [[ "${run}" == "" ]]; then cat << EOF >>etc/rc.d/rc.local # To disable networkmanager, chmod rc.networkmanager to 644 if [ -x /etc/rc.d/rc.networkmanager ]; then . /etc/rc.d/rc.networkmanager start fi EOF fi ( echo -e "\E[0;32mNote for Slackware Users:\E[0;0m" ) ( echo -e "\E[0;32m----- \E[0;0m" ) ( echo -e "\E[0;32mTo allow users to connect to the NetworkManager daemon, they have to be in the \E[0;0m" ) ( echo -e "\E[0;32mgroup -netdev-\E[0;0m" )