How to share a drive on the network
Posted: 24 Jul 2014, 05:10
In Windows I share a drive with a script that executes the NET SHARE command. What is the Linux command for such a function?
Yes, thank you, I found a few also. But .... http://forum.porteus.org/viewtopic.php? ... =60#p26495brokenman wrote:there are literally thousands of webpages with examples of using samba.
Code: Select all
#!/bin/bash
# http://forum.porteus.org/viewtopic.php?f=117&t=3205&start=15#p24861
mkdir /tmp/usm
mkdir /tmp/usm/usr
mkdir /tmp/usm/usr/bin
mkdir /tmp/usm/usr/share
mkdir /tmp/usm/usr/share/applications
mkdir /tmp/usm/usr/share/icons
mkdir /tmp/usm/usr/share/icons/hicolor
mkdir /tmp/usm/usr/share/icons/hicolor/48x48
mkdir /tmp/usm/usr/share/icons/hicolor/48x48/apps
mkdir /tmp/usm/usr/share/usm
mkdir /tmp/usm/usr/man
mkdir /tmp/usm/usr/man/man8
mkdir /tmp/usm/etc
mkdir /tmp/usm/etc/usm
mkdir /tmp/usm/var
mkdir /tmp/usm/var/usm
cp -a --parents /usr/bin/usm /tmp/usm/
cp -a --parents /usr/bin/usmgui /tmp/usm/
cp -a --parents /usr/bin/packagetools /tmp/usm/
cp -a --parents /usr/share/applications/usm.* /tmp/usm/
cp -a --parents /usr/share/icons/hicolor/48x48/apps/usm*.* /tmp/usm/
cp -a --parents /usr/share/usm/* /tmp/usm/
cp -a --parents /usr/man/man8/usm*.* /tmp/usm/
cp -a --parents /etc/usm /tmp/usm/
cp -a --parents /var/usm /tmp/usm/
echo
echo Press Enter to create module, Ctrl+C to end.
read
dir2xzm /tmp/usm /tmp/usm.xzm
Code: Select all
guest@porteus:~$ usmmodule.sh
Press Enter to create module, Ctrl+C to end.
gzip: /tmp/usm/usr/man/man8/usm.8 already exists; not overwritten
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /tmp/usm.xzm, block size 262144.
[===============================================================-] 569/569 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 11197.84 Kbytes (10.94 Mbytes)
8.55% of uncompressed filesystem size (130957.08 Kbytes)
Inode table size 1982 bytes (1.94 Kbytes)
39.19% of uncompressed inode table size (5058 bytes)
Directory table size 970 bytes (0.95 Kbytes)
48.60% of uncompressed directory table size (1996 bytes)
Number of duplicate files found 0
Number of inodes 94
Number of files 70
Number of fragments 11
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 24
Number of ids (unique uids + gids) 2
Number of uids 2
guest (1000)
root (0)
Number of gids 2
guest (1000)
root (0)
guest@porteus:~$ ls -s /tmp/usm*.*
11200 /tmp/usm.xzm
guest@porteus:~$
Code: Select all
txz2xzm usm-3.1.2-noarch-1.txz
Please consider a similar approach for Razor then.brokenman wrote:1. Add samba as a part of Porteus. Very users live in a single pc environment.
Porteus is light weight. Samba is not. It is included in Mate and will be in xfce but a highly stripped version is used.
Not a bad idea. Thank you. But the script approach that I created isn't that bad either IMO in that it produces an exact copy of the USM system that I have installed which should help debug problems in Always Fresh mode, like the samba module problem I am having.Instead of going to all that trouble below. Why not just download the latest slackware package and convert it a module?Then create a separate module for the database folders in /var/usm as these will be updated more frequently.Code: Select all
txz2xzm usm-3.1.2-noarch-1.txz