SECTION:=net
CATEGORY:=Network
TITLE:=A small non-spooling printer server
- DESCRIPTION:=\
- p910nd is a small daemon that copies any data received on \\\
- the port it is listening on to the corresponding printer \\\
- port. It is primarily intended for diskless Linux hosts \\\
- running as printer drivers but there is no reason why it \\\
- could not be used on diskful hosts. Port 9100 is copied \\\
- to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The \\\
- default is port 9100 to /dev/lp0.
URL:=http://www.etherboot.org/p910nd/
endef
+define Package/p910nd/conffiles
+/etc/config/p910nd
+endef
+
+define Package/p910nd/description
+ p910nd is a small daemon that copies any data received on
+ the port it is listening on to the corresponding printer
+ port. It is primarily intended for diskless Linux hosts
+ running as printer drivers but there is no reason why it
+ could not be used on diskful hosts. Port 9100 is copied
+ to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The
+ default is port 9100 to /dev/lp0.
+endef
+
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -DLOCKFILE_DIR=\"\\\"/tmp\"\\\""
BIN=p910nd
start_service() {
- local section="$1"
- config_get port "$section" port
- config_get device "$section" device
- config_get_bool bidirectional "$section" bidirectional
-
- options=""
- [ $bidirectional -eq 1 ] && {
- options="$options -b"
- }
- options="$options -f $device $port"
-
- $BIN $options
+ local section="$1"
+ config_get port "$section" port
+ config_get device "$section" device
+ config_get_bool bidirectional "$section" bidirectional
+
+ options=""
+ [ $bidirectional -eq 1 ] && {
+ options="$options -b"
+ }
+ options="$options -f $device $port"
+
+ $BIN $options
}
stop_service() {
- local section="$1"
- config_get port "$section" port
+ local section="$1"
+ config_get port "$section" port
- PID_F=/var/run/p910${port}d.pid
- [ -f $PID_F ] && kill $(cat $PID_F)
+ PID_F=/var/run/p910${port}d.pid
+ [ -f $PID_F ] && kill $(cat $PID_F)
}
start() {
- config_load "p910nd"
- config_foreach start_service p910nd
+ config_load "p910nd"
+ config_foreach start_service p910nd
}
stop() {
- config_load "p910nd"
- config_foreach stop_service p910nd
+ config_load "p910nd"
+ config_foreach stop_service p910nd
}