From: Chris Koeritz Date: Mon, 1 Oct 2012 23:30:14 +0000 (-0400) Subject: example fstab for nas setup. added random password function. X-Git-Tag: 2.140.90~1208 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=482a9f6c16ce5f52b5ea48efd76a3db13e36385a;hp=dbd570f34fbcd4b8f88bb19cdc380217fcc8ad22;p=feisty_meow.git example fstab for nas setup. added random password function. --- diff --git a/database/configuration/samba/fstab_nas_vitalstore b/database/configuration/samba/fstab_nas_vitalstore index bfe21df4..27c953a7 100644 --- a/database/configuration/samba/fstab_nas_vitalstore +++ b/database/configuration/samba/fstab_nas_vitalstore @@ -5,21 +5,23 @@ # fred's bastion of drives... # -# link to shaggy's archive drive. -shaggy:/z/archivonia /z/archivonia nfs exec,dev,suid,rw,user 0 0 +# shaggy's archive drive. +#shaggy:/z/archivonia /z/archivonia nfs exec,dev,suid,rw,user 0 0 + +# hal's buffalo drive. +hal:/z/buffaloon /z/buffaloon nfs exec,dev,suid,rw,user 0 0 # NAS mounts... #nfs not currently allowing writes. grrrrr. #vitalstore:/DataVolume/chunky /z/chunky nfs exec,dev,suid,rw,user 0 0 -#vitalstore:/DataVolume/stuffing /z/stuffing nfs exec,dev,suid,rw,user 0 0 +#vitalstore:/DataVolume/stuffing /z/stuffing nfs exec,dev,suid,rw,user 0 0 #vitalstore:/DataVolume/walrus /z/walrus nfs exec,dev,suid,ro,user 0 0 //vitalstore/chunky /z/chunky cifs credentials=/etc/samba/vitalstore_cifs.txt,uid=1008,gid=1008 0 0 //vitalstore/stuffing /z/stuffing cifs credentials=/etc/samba/vitalstore_cifs.txt,uid=1008,gid=1008 0 0 //vitalstore/walrus /z/walrus cifs credentials=/etc/samba/vitalstore_cifs.txt,uid=1008,gid=1008 0 0 -# only for the subversion server, currently hal. -# //vitalstore/subversion /z/repo cifs credentials=/etc/samba/vitalstore_cifs.txt,uid=1008,gid=1008 0 0 +//vitalstore/virtual-fred /z/fredgrid cifs credentials=/etc/samba/vitalstore_cifs.txt,uid=1008,gid=1008 0 0 # ############## diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index fe56aea6..3a86546b 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -238,6 +238,17 @@ if [ -z "$skip_all" ]; then nechung } + # generates a random password where the first parameter is the number of characters + # in the password (default 20) and the second parameter specifies whether to use + # special characters (1) or not (0). + # found function at http://legroom.net/2010/05/06/bash-random-password-generator + function random_password() + { + [ "$2" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]" + cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-32} + echo + } + function function_sentinel() { return 0; } if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi